zig/lib/std/os
Brandon Black 76c62e509b 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.
2025-09-03 21:45:03 -07:00
..
linux std.os.linux: powerpc syscalls clobber ctr and xer 2025-08-28 07:41:22 +02:00
plan9 zig fmt 2025-07-16 10:27:39 -07:00
uefi std.Io: delete GenericReader 2025-08-29 17:14:26 -07:00
windows update format strings in os/windows/test.zig 2025-07-08 08:46:31 -07:00
emscripten.zig sigset_t: sigemptyset() and sigfillset() are functions that return sigset_t 2025-04-30 20:32:04 -07:00
freebsd.zig std.os.freebsd.copy_file_range: add missing error.Unexpected 2025-07-08 16:53:02 -07:00
linux.zig Fix cmsghdr struct for the *nixes 2025-09-03 21:45:03 -07:00
plan9.zig sigset_t: sigemptyset() and sigfillset() are functions that return sigset_t 2025-04-30 20:32:04 -07:00
uefi.zig std.Io: delete GenericReader 2025-08-29 17:14:26 -07:00
wasi.zig wasi: fix wasm-wasi-musl constants 2025-02-09 09:08:11 +01:00
windows.zig std.os.windows: map RtlGenRandom() failure to error.SystemResources 2025-08-08 07:25:26 +02:00