From db2b02c80988543ac80404bce77ec3c506e3aad2 Mon Sep 17 00:00:00 2001 From: Nathan Bourgeois Date: Fri, 9 Oct 2026 03:23:48 +0200 Subject: [PATCH] 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 --- lib/std/posix.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/posix.zig b/lib/std/posix.zig index d845a8607dbb89550018673c8b20ec2db7aebdce..b7335cd8916a8c45e4da2231b5a023508b6f15fd 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -50,6 +50,8 @@ else switch (native_os) { pub const ino_t = u64; pub const IFNAMESIZE = {}; pub const SIG = void; + pub const cmsghdr = void; + pub const cmsg_align = {}; // https://github.com/pspdev/newlib/blob/9e0a073634ad73e8e088f2e071c55a9fe5d39709/newlib/libc/sys/psp/sys/dirent.h#L19 pub const NAME_MAX = 255; -- 2.54.0