summaryrefslogtreecommitdiffstats
path: root/chromium/patches/021-musl-no-res-ninit.patch
diff options
context:
space:
mode:
authorzorz <zorz@krypt.sh>2026-04-02 01:11:55 +0300
committerzorz <zorz@krypt.sh>2026-04-02 01:11:55 +0300
commit936433a5deb6ccc8f8476096f2c2b8dc72c33388 (patch)
treefe62acdddbfc42bc377383f5706f2c64120b942c /chromium/patches/021-musl-no-res-ninit.patch
parent16d3c790c04095ea1c8488116f56719e5480efb7 (diff)
downloadzorz-936433a5deb6ccc8f8476096f2c2b8dc72c33388.tar.gz
zorz-936433a5deb6ccc8f8476096f2c2b8dc72c33388.tar.xz
chromium musl
Diffstat (limited to 'chromium/patches/021-musl-no-res-ninit.patch')
-rw-r--r--chromium/patches/021-musl-no-res-ninit.patch32
1 files changed, 32 insertions, 0 deletions
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 @@
1similar to dns-resolver.patch, musl doesn't have res_ninit and so on
2--
3--- a/net/dns/public/scoped_res_state.cc
4+++ b/net/dns/public/scoped_res_state.cc
5@@ -13,7 +13,7 @@
6 namespace net {
7
8 ScopedResState::ScopedResState() {
9-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
10+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE)
11 // Note: res_ninit in glibc always returns 0 and sets RES_INIT.
12 // res_init behaves the same way.
13 memset(&_res, 0, sizeof(_res));
14@@ -25,16 +25,8 @@
15 }
16
17 ScopedResState::~ScopedResState() {
18-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
19-
20- // Prefer res_ndestroy where available.
21-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
22- res_ndestroy(&res_);
23-#else
24- res_nclose(&res_);
25-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
26-
27-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
28+ // musl res_init() doesn't actually do anything
29+ // no destruction is necessary as no memory has been allocated
30 }
31
32 bool ScopedResState::IsValid() const {