aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-10-01 17:18:30 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-10-29 06:20:48 -0700
commit961961cf85618083702799ef60f9f77dec806774 (patch)
treee1d9725761771c3ad79379c1e4a526796f5a6487 /lib/std/Build/Step
parent95dee2af9c6ed17286a1b3be81b11093c2ecb5f2 (diff)
downloadzig-961961cf85618083702799ef60f9f77dec806774.tar.gz
zig-961961cf85618083702799ef60f9f77dec806774.zip
std: fix msghdr and cmsghdr when using musl libc
glibc and linux kernel use size_t for some field lengths while POSIX and musl use int. This bug would have caused breakage the first time someone tried to call sendmsg on a 64-bit big endian system when linking musl libc. my opinion: * msghdr.iovlen: kernel and glibc have it right. This field should definitely be size_t. With int, the padding bytes are wasted for no reason. * msghdr.controllen: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes next to flags. * cmsghdr.len: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes since the other fields are also 32-bits each.
Diffstat (limited to 'lib/std/Build/Step')
0 files changed, 0 insertions, 0 deletions