authorgravatar for iridescentrose@noreply.codeberg.orgNathan Bourgeois <iridescentrose@noreply.codeberg.org> 2026-10-09 03:23:48+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-10-09 03:23:48+02:00
log3edf35a1d3ccae53fe1b1c064a4a1eadd6a53105
treee81d8608cded4a057214ef50d1ceb588bfd41343
parentf3a696e50ebeb59c387d5d250811677e3a8d8ec3

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;