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

This commit is contained in:
Alex Rønne Petersen 2025-05-29 15:53:45 +02:00
parent 309ac27d35
commit fb3a9fc18e
No known key found for this signature in database

View file

@ -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 // 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. // sigset by the C library, so avoid testing them.
fn reserved_signo(i: usize) bool { fn reserved_signo(i: usize) bool {
if (native_os == .macos) { if (native_os == .macos) return false;
return false; if (!builtin.link_libc) return false;
} const max = if (native_os == .netbsd) 32 else 31;
return builtin.link_libc and (i >= 32 and i < posix.sigrtmin()); return i > max and i < posix.sigrtmin();
} }
test "sigset add/del" { test "sigset add/del" {