authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-01 14:30:49-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-10-29 06:20:48-07:00
logbcb6760fa5a2dce29f917912a86ba3ba7414fccc
treef4512f1a3c3d11dfef4dbf1cb4124e76af3d3354
parent3b80fde6f42f104278d4102562dd2b714aafe877

std.os.linux: remove unnecessary warnings from sendmmsg

The one about INT_MAX is self-evident from the type system. The one about kernel having bad types doesn't seem accurate as I checked the source code and it uses size_t for all the appropriate types, matching the libc struct definition for msghdr and msghdr_const.

1 files changed, 0 insertions(+), 6 deletions(-)

lib/std/os/linux.zig-6
......@@ -2079,12 +2079,6 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize {
20792079 }
20802080}
20812081
2082/// Warning: libc is defined to have incompatible integer types with the
2083/// corresponding kernel data structures for this syscall.
2084///
2085/// Warning: on 64-bit systems, if any message length would exceed `maxInt(i32)`,
2086/// number of bytes sent cannot be determined, because the kernel uses `ssize_t`
2087/// for `sendmsg` return value but `int` for the corresponding values here.
20882082pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize {
20892083 return syscall4(.sendmmsg, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(msgvec), vlen, flags);
20902084}