From fb3a9fc18e5b7ba3cbd0da938fa7075bd6217e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 29 May 2025 15:53:45 +0200 Subject: [PATCH] std.posix.test: Fix reserved_signo() for NetBSD. --- 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 index ce1e7950d1..776fe615b3 100644 --- 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" {