--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc +++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc @@ -13,7 +13,7 @@ namespace net { ScopedResState::ScopedResState() { -#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE) // Note: res_ninit in glibc always returns 0 and sets RES_INIT. // res_init behaves the same way. memset(&_res, 0, sizeof(_res)); @@ -25,16 +25,8 @@ } ScopedResState::~ScopedResState() { -#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) - - // Prefer res_ndestroy where available. -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) - res_ndestroy(&res_); -#else - res_nclose(&res_); -#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) - -#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) + // musl res_init() doesn't actually do anything + // no destruction is necessary as no memory has been allocated } bool ScopedResState::IsValid() const { --- a/src/3rdparty/chromium/net/dns/host_resolver_manager.cc +++ b/src/3rdparty/chromium/net/dns/host_resolver_manager.cc @@ -3014,8 +3014,7 @@ NetworkChangeNotifier::AddConnectionTypeObserver(this); if (system_dns_config_notifier_) system_dns_config_notifier_->AddObserver(this); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ - !BUILDFLAG(IS_ANDROID) +#if defined(__GLIBC__) EnsureDnsReloaderInit(); #endif --- a/src/3rdparty/chromium/net/dns/dns_reloader.cc +++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc @@ -6,8 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ - !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) +#if defined(__GLIBC__) #include --- a/src/3rdparty/chromium/net/dns/host_resolver_proc.cc +++ b/src/3rdparty/chromium/net/dns/host_resolver_proc.cc @@ -176,8 +176,7 @@ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::WILL_BLOCK); -#if BUILDFLAG(IS_POSIX) && \ - !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) +#if defined(__GLIBC__) DnsReloaderMaybeReload(); #endif absl::optional ai;