aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorBrandon Black <bblack@wikimedia.org>2025-09-02 12:20:11 -0500
committerAndrew Kelley <andrew@ziglang.org>2025-09-03 21:45:03 -0700
commit76c62e509b31fa31a537da94966cbd2971dfa79b (patch)
tree044897678064354bd51f8dbf11640916b6b8cc4b /src/Compilation.zig
parentb1189ab038ad1885f961562bf188f0bd3da12153 (diff)
downloadzig-76c62e509b31fa31a537da94966cbd2971dfa79b.tar.gz
zig-76c62e509b31fa31a537da94966cbd2971dfa79b.zip
Fix cmsghdr struct for the *nixes
Previously we had a single definition of std.c.cmsghdr for all libc-linking platforms which aliased from the Solaris definition, a superfluous matching one in std.os.dragonfly, and no others. The existing definition from std.c didn't actually work for Linux, as Linux's "len" field is usize in the kernel's definition. Emscripten follows the Linux model of course (but uses the binary-compatible musl definition, which has an endian-sensitive padding scheme to make the len type "socklen_t" even though the kernel uses a usize, which is fair). This unifies and documents all the known *nix-ish cases (I'm not sure if wasi or windows really has cmsghdr support? Could be added later, void for now), such that c.cmsghdr and posix.system.cmsghdr should work correctly for all the known cases here, libc or otherwise.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions