aboutsummaryrefslogtreecommitdiffstats
path: root/www/libxul/files/patch-bug810716
blob: 8c08e9a669869550b7b50902a3fec272cbac388c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git configure.in configure.in
index 2084be9..eb6eeb2 100644
--- configure.in
+++ configure.in
@@ -3369,14 +3369,19 @@ fi
 AC_CACHE_CHECK(
     [for res_ninit()],
     ac_cv_func_res_ninit,
-    [AC_TRY_LINK([
+    [AC_TRY_RUN([
         #ifdef linux
         #define _BSD_SOURCE 1
         #endif
+        #include <sys/types.h>
+        #include <netinet/in.h>
+        #include <arpa/nameser.h>
         #include <resolv.h>
-        ],
-        [int foo = res_ninit(&_res);],
+        int main(int argc, char **argv){
+            int foo = res_ninit(&_res);
+        }],
         [ac_cv_func_res_ninit=yes],
+        [ac_cv_func_res_ninit=no],
         [ac_cv_func_res_ninit=no])
     ])
 
diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
index e828beb..6444246 100644
--- extensions/auth/nsAuthGSSAPI.cpp
+++ extensions/auth/nsAuthGSSAPI.cpp
@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
 #endif
 
 #if defined(HAVE_RES_NINIT)
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
 #include <resolv.h>
 #endif
 
diff --git js/src/configure.in js/src/configure.in
index e25f569..b9722f9 100644
--- js/src/configure.in
+++ js/src/configure.in
@@ -2797,14 +2797,19 @@ fi
 AC_CACHE_CHECK(
     [for res_ninit()],
     ac_cv_func_res_ninit,
-    [AC_TRY_LINK([
+    [AC_TRY_RUN([
         #ifdef linux
         #define _BSD_SOURCE 1
         #endif
+        #include <sys/types.h>
+        #include <netinet/in.h>
+        #include <arpa/nameser.h>
         #include <resolv.h>
-        ],
-        [int foo = res_ninit(&_res);],
+        int main(int argc, char **argv){
+            int foo = res_ninit(&_res);
+        }],
         [ac_cv_func_res_ninit=yes],
+        [ac_cv_func_res_ninit=no],
         [ac_cv_func_res_ninit=no])
     ])