authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-15 19:29:42+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-15 19:29:42+02:00
log95d4703bee77ead0bc21f3cf8ca4c09edeba6bd4
tree321f0fa16f1a724e6b39b4b3a13c84b5f2773d15
parentda32e05a1ccdeb9ede15405a599893b643ff474e
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: fix NCCS value for all linux and hurd targets

closes https://codeberg.org/ziglang/zig/issues/37228

1 files changed, 7 insertions(+), 1 deletions(-)

lib/std/c.zig+7-1
...@@ -8973,9 +8973,15 @@ pub const V = switch (native_os) {...@@ -8973,9 +8973,15 @@ pub const V = switch (native_os) {
8973};8973};
89748974
8975pub const NCCS = switch (native_os) {8975pub const NCCS = switch (native_os) {
8976 .linux => linux.NCCS,8976 .linux => if (native_abi.isGnu())
8977 32
8978 else if (native_abi.isMusl())
8979 if (native_arch.isPowerpc()) 19 else 32
8980 else
8981 linux.NCCS,
8977 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,8982 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
8978 .haiku => 11,8983 .haiku => 11,
8984 .hurd => 20,
8979 .illumos => 19,8985 .illumos => 19,
8980 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L158986 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L15
8981 .emscripten, .serenity => 32,8987 .emscripten, .serenity => 32,