authorgravatar for iridescentrose@noreply.codeberg.orgNathan Bourgeois <iridescentrose@noreply.codeberg.org> 2026-10-09 03:23:48+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-09 09:46:20+02:00
logdb2b02c80988543ac80404bce77ec3c506e3aad2
tree7f9b6d6b27f8b0681d7f9c5d32f9aaeee6ecd38a
parente309ca0a474270dfc11373f25eabbe86d280bd8b
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.posix: Add missing `cmsghdr` and `cmsg_align` to compile on `psp` (#37154)

After testing Zig-PSP on Zig 0.17, our `http` examples fail because `std/Io/net.zig` includes `cmsghdr` and `cmsg_align`. The PSP does not support this, therefore adding the pattern here fixes our builds. Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37154 Reviewed-by: Andrew Kelley <andrew@ziglang.org>

1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/posix.zig+2
...@@ -50,6 +50,8 @@ else switch (native_os) {...@@ -50,6 +50,8 @@ else switch (native_os) {
50 pub const ino_t = u64;50 pub const ino_t = u64;
51 pub const IFNAMESIZE = {};51 pub const IFNAMESIZE = {};
52 pub const SIG = void;52 pub const SIG = void;
53 pub const cmsghdr = void;
54 pub const cmsg_align = {};
5355
54 // https://github.com/pspdev/newlib/blob/9e0a073634ad73e8e088f2e071c55a9fe5d39709/newlib/libc/sys/psp/sys/dirent.h#L1956 // https://github.com/pspdev/newlib/blob/9e0a073634ad73e8e088f2e071c55a9fe5d39709/newlib/libc/sys/psp/sys/dirent.h#L19
55 pub const NAME_MAX = 255;57 pub const NAME_MAX = 255;