aboutsummaryrefslogblamecommitdiffstats
path: root/testing/chromium/chromium-uclibc-resolv.patch
blob: decc14bc9cda923ddd4bfe83b55965d395396a76 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                       


                   

                                                                        
                                          















                                                                          
 
                                   

                                                                     
      
 



















































                                                                        

                                                                                             


                                               
--- 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