From fb66d7712ca5d41b408f35835d8b796e1d9c0e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 15 Jan 2026 09:51:07 +0100 Subject: [PATCH] std.c: fix W functions for NetBSD I'm not sure where the old logic came from but it certainly didn't match NetBSD 10.1 system headers, and was causing the build system to see incorrect exit status information for processes that were expected to crash (e.g. SIGABRT). --- lib/std/c.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index df757fcff928caa0e548ce98cf9869e92495d493..8e9f5e8c44a064965fc8b614e44bd1187af2ae0e 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -3863,11 +3863,11 @@ pub const W = switch (native_os) { } pub fn IFCONTINUED(s: u32) bool { - return ((s & 0x7f) == 0xffff); + return (s == CONTINUED); } pub fn IFSTOPPED(s: u32) bool { - return ((s & 0x7f != 0x7f) and !IFCONTINUED(s)); + return (((s & 0x7f) == STOPPED) and !IFCONTINUED(s)); } pub fn IFSIGNALED(s: u32) bool { -- 2.54.0