aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/chromium/chromium-uclibc-resolv.patch
blob: decc14bc9cda923ddd4bfe83b55965d395396a76 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc
+++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc
@@ -187,7 +187,7 @@
     }
 
     bool r = true;
-#if defined(OS_MACOSX) || defined(OS_OPENBSD)
+#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD))
     if ((_res.options & RES_INIT) == 0) {
 #if defined(OS_OPENBSD)
       if (res_init() != 0)
--- chromium-17.0.942.0.orig/net/base/host_resolver_proc.cc
+++ chromium-17.0.942.0/net/base/host_resolver_proc.cc
@@ -184,7 +184,7 @@
   hints.ai_socktype = SOCK_STREAM;
 
 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
-    !defined(OS_ANDROID)
+    !defined(OS_ANDROID) && !defined(__UCLIBC__)
   DnsReloaderMaybeReload();
 #endif
   int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
--- chromium-17.0.942.0.orig/net/base/dns_reloader.cc
+++ chromium-17.0.942.0/net/base/dns_reloader.cc
@@ -4,7 +4,7 @@
 
 #include "net/base/dns_reloader.h"
 
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+#if 0
 
 #include <resolv.h>
 
--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc
+++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc
@@ -187,9 +187,9 @@
     }
 
     bool r = true;
-#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD))
+#if defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(__UCLIBC__)
     if ((_res.options & RES_INIT) == 0) {
-#if defined(OS_OPENBSD)
+#if defined(OS_OPENBSD) || defined(__UCLIBC__)
       if (res_init() != 0)
 #else
       if (res_ninit(&_res) != 0)
--- chromium-17.0.942.0.orig/net/dns/dns_config_service_posix.cc
+++ chromium-17.0.942.0/net/dns/dns_config_service_posix.cc
@@ -30,7 +30,7 @@
       success_(false) {}
 
   void DoWork() OVERRIDE {
-#if defined(OS_OPENBSD)
+#if defined(OS_OPENBSD) || defined(__UCLIBC__)
     if ((res_init() == 0) && (_res.options & RES_INIT)) {
       success_ = ConvertResToConfig(_res, &dns_config_);
 #else
@@ -45,7 +45,7 @@
     }
 #if defined(OS_MACOSX)
     res_ndestroy(&res);
-#elif !defined(OS_OPENBSD)
+#elif !defined(OS_OPENBSD) && !defined(__UCLIBC__)
     res_nclose(&res);
 #endif
   }
@@ -132,7 +132,9 @@
 #if defined(RES_ROTATE)
   dns_config->rotate = res.options & RES_ROTATE;
 #endif
+#if defined(RES_USE_EDNS0)
   dns_config->edns0 = res.options & RES_USE_EDNS0;
+#endif
 
   return true;
 }
--- chromium-17.0.942.0.orig/net/base/host_resolver_impl.cc
+++ chromium-17.0.942.0/net/base/host_resolver_impl.cc
@@ -1081,7 +1081,7 @@
     additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY;
 #endif
   NetworkChangeNotifier::AddIPAddressObserver(this);
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(__UCLIBC__)
   EnsureDnsReloaderInit();
   NetworkChangeNotifier::AddDNSObserver(this);
 #endif