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 20:13:22+02:00
log5cba8339049cc70c3fabd457188fbdb397ab9321
treeb2485977f9b95be9de248e2e1ea8b86b869b27e1
parentd3b1f18b06e81d1ddf163820c1d0de21a1c46521
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
......@@ -9187,9 +9187,15 @@ pub const V = switch (native_os) {
91879187};
91889188
91899189pub const NCCS = switch (native_os) {
9190 .linux => linux.NCCS,
9190 .linux => if (native_abi.isGnu())
9191 32
9192 else if (native_abi.isMusl())
9193 if (native_arch.isPowerpc()) 19 else 32
9194 else
9195 linux.NCCS,
91919196 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
91929197 .haiku => 11,
9198 .hurd => 20,
91939199 .illumos => 19,
91949200 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L15
91959201 .emscripten, .wasi, .serenity => 32,