62 lines
2.8 KiB
Diff
62 lines
2.8 KiB
Diff
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
|
|
index 2f94832..2dd1a98 100644
|
|
--- a/net/dns/dns_config_service_posix.cc
|
|
+++ b/net/dns/dns_config_service_posix.cc
|
|
@@ -150,7 +150,7 @@ ConfigParsePosixResult ReadDnsConfig(DnsConfig* dns_config) {
|
|
#if !defined(OS_ANDROID)
|
|
ConfigParsePosixResult result;
|
|
// TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia.
|
|
-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA)
|
|
+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || (defined(OS_LINUX) && !defined(__GLIBC__))
|
|
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
|
|
// res_init behaves the same way.
|
|
memset(&_res, 0, sizeof(_res));
|
|
@@ -173,7 +173,7 @@ ConfigParsePosixResult ReadDnsConfig(DnsConfig* dns_config) {
|
|
#else
|
|
res_nclose(&res);
|
|
#endif // defined(OS_MACOSX) || defined(OS_FREEBSD)
|
|
-#endif // defined(OS_OPENBSD)
|
|
+#endif // defined(OS_OPENBSD) || defined(OS_FUCHSIA) || (defined(OS_LINUX) && !defined(__GLIBC__))
|
|
|
|
#if defined(OS_MACOSX) && !defined(OS_IOS)
|
|
ConfigParsePosixResult error = DnsConfigWatcher::CheckDnsConfig();
|
|
diff --git a/net/dns/dns_reloader.cc b/net/dns/dns_reloader.cc
|
|
index 952cff4..4b366f4 100644
|
|
--- a/net/dns/dns_reloader.cc
|
|
+++ b/net/dns/dns_reloader.cc
|
|
@@ -4,7 +4,7 @@
|
|
|
|
#include "net/dns/dns_reloader.h"
|
|
|
|
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
!defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
|
|
|
#include <resolv.h>
|
|
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
|
|
index e8dea46..c86a830 100644
|
|
--- a/net/dns/host_resolver_manager.cc
|
|
+++ b/net/dns/host_resolver_manager.cc
|
|
@@ -2386,7 +2386,7 @@ HostResolverManager::HostResolverManager(
|
|
NetworkChangeNotifier::AddConnectionTypeObserver(this);
|
|
if (system_dns_config_notifier_)
|
|
system_dns_config_notifier_->AddObserver(this);
|
|
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
!defined(OS_ANDROID)
|
|
EnsureDnsReloaderInit();
|
|
#endif
|
|
diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc
|
|
index 0824540..3384978 100644
|
|
--- a/net/dns/host_resolver_proc.cc
|
|
+++ b/net/dns/host_resolver_proc.cc
|
|
@@ -197,7 +197,7 @@ int SystemHostResolverCall(const std::string& host,
|
|
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
|
base::BlockingType::WILL_BLOCK);
|
|
|
|
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
|
|
!defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
|
DnsReloaderMaybeReload();
|
|
#endif
|