Skip to content

Commit fb3a9fc

Browse files
committed
std.posix.test: Fix reserved_signo() for NetBSD.
1 parent 309ac27 commit fb3a9fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/std/posix/test.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,10 @@ test "sigset empty/full" {
889889
// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a
890890
// sigset by the C library, so avoid testing them.
891891
fn reserved_signo(i: usize) bool {
892-
if (native_os == .macos) {
893-
return false;
894-
}
895-
return builtin.link_libc and (i >= 32 and i < posix.sigrtmin());
892+
if (native_os == .macos) return false;
893+
if (!builtin.link_libc) return false;
894+
const max = if (native_os == .netbsd) 32 else 31;
895+
return i > max and i < posix.sigrtmin();
896896
}
897897

898898
test "sigset add/del" {

0 commit comments

Comments
 (0)