diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/aardvark-dns/close_range-musl.patch | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/aardvark-dns/close_range-musl.patch')
| -rw-r--r-- | opt/aardvark-dns/close_range-musl.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/opt/aardvark-dns/close_range-musl.patch b/opt/aardvark-dns/close_range-musl.patch new file mode 100644 index 0000000..e853b28 --- /dev/null +++ b/opt/aardvark-dns/close_range-musl.patch @@ -0,0 +1,16 @@ +--- a/src/main.rs ++++ b/src/main.rs +@@ -34,7 +34,13 @@ + + fn main() { + // Close all fds we inherited from our parent process, we only need stdio. ++ // musl's libc crate exposes SYS_close_range but not the safe ++ // wrapper (only defined for target_env = "gnu" upstream), so fall ++ // back to the raw syscall there. ++ #[cfg(target_env = "gnu")] + let _ = unsafe { libc::close_range(3, libc::c_uint::MAX, 0) }; ++ #[cfg(not(target_env = "gnu"))] ++ let _ = unsafe { libc::syscall(libc::SYS_close_range, 3u32, libc::c_uint::MAX, 0u32) }; + + let formatter = Formatter3164 { + facility: Facility::LOG_USER, |
