From 388c02e8453fad9b74965f2596483aa7533ea903 Mon Sep 17 00:00:00 2001 From: Brandon L Black Date: Mon, 5 Oct 2026 08:15:26 -0500 Subject: [PATCH] Io.net.cmsg: Fix Iterator.Message.header alignment Without this change, on some targets (e.g. aarch64-freebsd), calling `cmsg.data()` with `Iterator.message.header` as the argument would result in compilation failures like: error: expected type '*align(8) c.posix_cmsghdr', found '*c.posix_cmsghdr' --- lib/std/Io/net.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/Io/net.zig b/lib/std/Io/net.zig index 4b80d35a016e94a5580d3eae95106ee62e03a396..d128f2d2b37f0f8383e72953c0e345e0a0d6f7e9 100644 --- a/lib/std/Io/net.zig +++ b/lib/std/Io/net.zig @@ -1528,7 +1528,7 @@ pub const cmsg = struct { control: []align(cmsg_align) u8, pub const Message = struct { - header: *cmsghdr, + header: *align(cmsg_align) cmsghdr, data: []align(cmsg_align) u8, }; -- 2.54.0