$NetBSD: patch-br,v 1.2.2.1 2004/10/26 11:09:16 agc Exp $

--- nsprpub/pr/src/misc/prnetdb.c.orig	2004-01-23 09:22:37.000000000 +1100
+++ nsprpub/pr/src/misc/prnetdb.c
@@ -2094,7 +2094,17 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
          */
         hints.ai_socktype = SOCK_STREAM;
 
+/* NetBSD >=2.0F has a thread-safe resolver */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 200060000
+	LOCK_DNS();
+#endif
+
         rv = GETADDRINFO(hostname, NULL, &hints, &res);
+
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 200060000
+        UNLOCK_DNS();
+#endif
+
         if (rv == 0)
             return (PRAddrInfo *) res;
 
