summaryrefslogtreecommitdiff
path: root/www/firefox3/patches/patch-br
blob: 6557e0c480e28a6700d4e29582363d3fa0f4f809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-br,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $

diff -ruN ../Orig/mozilla/nsprpub/pr/src/misc/prnetdb.c ./nsprpub/pr/src/misc/prnetdb.c
--- ../Orig/mozilla/nsprpub/pr/src/misc/prnetdb.c	2005-08-19 02:24:38.000000000 +0900
+++ ./nsprpub/pr/src/misc/prnetdb.c	2005-12-04 19:18:10.000000000 +0900
@@ -2110,7 +2110,17 @@
          */
         hints.ai_socktype = SOCK_STREAM;
 
+/* NetBSD >= 2.99.9 has a thread-safe resolver */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+	LOCK_DNS();
+#endif
+
         rv = GETADDRINFO(hostname, NULL, &hints, &res);
+
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+        UNLOCK_DNS();
+#endif
+
         if (rv == 0)
             return (PRAddrInfo *) res;