void-packages/srcpkgs/qt6-pdf/patches/0802-musl-no-res-ninit-nclo...

21 lines
694 B
Diff

--- 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)
+#ifndef __GLIBC__
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
// res_init behaves the same way.
memset(&_res, 0, sizeof(_res));
@@ -30,7 +30,7 @@ ScopedResState::~ScopedResState() {
// Prefer res_ndestroy where available.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
res_ndestroy(&res_);
-#else
+#elif defined(__GLIBC__)
res_nclose(&res_);
#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)