From 936433a5deb6ccc8f8476096f2c2b8dc72c33388 Mon Sep 17 00:00:00 2001 From: zorz Date: Thu, 2 Apr 2026 01:11:55 +0300 Subject: chromium musl --- chromium/patches/021-musl-no-res-ninit.patch | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 chromium/patches/021-musl-no-res-ninit.patch (limited to 'chromium/patches/021-musl-no-res-ninit.patch') diff --git a/chromium/patches/021-musl-no-res-ninit.patch b/chromium/patches/021-musl-no-res-ninit.patch new file mode 100644 index 0000000..d74f6cd --- /dev/null +++ b/chromium/patches/021-musl-no-res-ninit.patch @@ -0,0 +1,32 @@ +similar to dns-resolver.patch, musl doesn't have res_ninit and so on +-- +--- a/net/dns/public/scoped_res_state.cc ++++ b/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 { -- cgit v1.2.3