summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-br
blob: 39d4ddb465b3b7c24e81d7bb498095712b3945a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$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;