From 95d4703bee77ead0bc21f3cf8ca4c09edeba6bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 15 Oct 2026 19:29:42 +0200 Subject: [PATCH] std.c: fix NCCS value for all linux and hurd targets closes https://codeberg.org/ziglang/zig/issues/37228 --- lib/std/c.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index 9fa2831981cee84b0acb45af891e5897f396d329..d7c6c379f749ab462b2ce7a4b361812ec1f0e703 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -8973,9 +8973,15 @@ pub const V = switch (native_os) { }; pub const NCCS = switch (native_os) { - .linux => linux.NCCS, + .linux => if (native_abi.isGnu()) + 32 + else if (native_abi.isMusl()) + if (native_arch.isPowerpc()) 19 else 32 + else + linux.NCCS, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20, .haiku => 11, + .hurd => 20, .illumos => 19, // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L15 .emscripten, .serenity => 32, -- 2.54.0