authorgravatar for bblack@wikimedia.orgBrandon Black <bblack@wikimedia.org> 2025-08-25 13:38:33-05:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-27 20:53:49+02:00
log9dc3fce4c4a299df57a664f0c4dd6d8dfd07986d
tree4f68fcde06221b09914a3590f4c66eaf1c8f439e
parent9c3e09cbeea79a05db965e82e12ac5bec640a66c
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: add correct SOMAXCONN for BSDs

Note the previous "28" here for openbsd was some kind of copy error long ago. That's the value of KERN.SOMAXCONN, which is an entirely different thing.

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

lib/std/c.zig+6-1
...@@ -6664,7 +6664,12 @@ pub const SOMAXCONN = switch (native_os) {...@@ -6664,7 +6664,12 @@ pub const SOMAXCONN = switch (native_os) {
6664 .windows => ws2_32.SOMAXCONN,6664 .windows => ws2_32.SOMAXCONN,
6665 // https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L1286665 // https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L128
6666 .solaris, .illumos, .serenity => 128,6666 .solaris, .illumos, .serenity => 128,
6667 .openbsd => 28,6667 // https://github.com/freebsd/freebsd-src/blob/9ab31f821ad1c6bad474510447387c50bef2c24c/sys/sys/socket.h#L434
6668 // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/fd3d1949d526ffa646e57037770acd6f2f3bb617/sys/sys/socket.h#L393
6669 // https://github.com/NetBSD/src/blob/a673fb3f8487e974c669216064f7588207229fea/sys/sys/socket.h#L472
6670 // https://github.com/openbsd/src/blob/8ba9cd88f10123fef7af805b8e5ccc2463ad8fa4/sys/sys/socket.h#L483
6671 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L815
6672 .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .macos, .ios, .tvos, .watchos, .visionos => 128,
6668 else => void,6673 else => void,
6669};6674};
6670pub const IFNAMESIZE = switch (native_os) {6675pub const IFNAMESIZE = switch (native_os) {