authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 15:53:45+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 16:48:28+02:00
logfb3a9fc18e5b7ba3cbd0da938fa7075bd6217e88
tree69927fd084090a56d32301e37547d58d81225c11
parent309ac27d35d92166e19be776db91789916e86109
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.posix.test: Fix reserved_signo() for NetBSD.


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/posix/test.zig+4-4
...@@ -889,10 +889,10 @@ test "sigset empty/full" {...@@ -889,10 +889,10 @@ test "sigset empty/full" {
889// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a889// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a
890// sigset by the C library, so avoid testing them.890// sigset by the C library, so avoid testing them.
891fn reserved_signo(i: usize) bool {891fn reserved_signo(i: usize) bool {
892 if (native_os == .macos) {892 if (native_os == .macos) return false;
893 return false;893 if (!builtin.link_libc) return false;
894 }894 const max = if (native_os == .netbsd) 32 else 31;
895 return builtin.link_libc and (i >= 32 and i < posix.sigrtmin());895 return i > max and i < posix.sigrtmin();
896}896}
897897
898test "sigset add/del" {898test "sigset add/del" {