6045fe12fd
NetBSD >=2.0F - I've been running with it for months on -current without any problems.
22 lines
649 B
Text
22 lines
649 B
Text
$NetBSD: patch-br,v 1.3 2004/10/04 09:15:29 grant 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;
|
|
|