void-packages/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver...

64 lines
2.6 KiB
Diff

--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
+++ qt6-webengine-6.4.2/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) || (BUILDFLAG(IS_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));
@@ -25,7 +25,7 @@ ScopedResState::ScopedResState() {
}
ScopedResState::~ScopedResState() {
-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
// Prefer res_ndestroy where available.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
@@ -34,7 +34,7 @@ ScopedResState::~ScopedResState() {
res_nclose(&res_);
#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
}
bool ScopedResState::IsValid() const {
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc
@@ -7,7 +7,8 @@
#include "build/build_config.h"
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
+ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \
+ !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
#include <resolv.h>
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
@@ -310,8 +310,7 @@
}
void EnsureSystemHostResolverCallReady() {
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
- !BUILDFLAG(IS_ANDROID)
+#if defined(__GLIBC__)
EnsureDnsReloaderInit();
#elif BUILDFLAG(IS_WIN)
EnsureWinsockInit();
@@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st
base::BlockingType::WILL_BLOCK);
#if BUILDFLAG(IS_POSIX) && \
- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID))
+ !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID) || \
+ (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
DnsReloaderMaybeReload();
#endif
auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network);