commit fb3a9fc18e5b7ba3cbd0da938fa7075bd6217e88 (tree) parent 309ac27d35d92166e19be776db91789916e86109 Author: Alex Rønne Petersen <alex@alexrp.com> Date: Thu, 29 May 2025 15:53:45 +0200 std.posix.test: Fix reserved_signo() for NetBSD. Diffstat:
| M | lib/std/posix/test.zig | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/std/posix/test.zig b/lib/std/posix/test.zig @@ -889,10 +889,10 @@ test "sigset empty/full" { // Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a // sigset by the C library, so avoid testing them. fn reserved_signo(i: usize) bool { - if (native_os == .macos) { - return false; - } - return builtin.link_libc and (i >= 32 and i < posix.sigrtmin()); + if (native_os == .macos) return false; + if (!builtin.link_libc) return false; + const max = if (native_os == .netbsd) 32 else 31; + return i > max and i < posix.sigrtmin(); } test "sigset add/del" {