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-02 16:30:59-07:00
log29d4de53d6bb970050981d6c0f5fd38372b31345
tree96b8fad06c4138506c2460a6925c8d258d0ee81b
parent9354036dc2e547f52ec3c445b83f4f5a06c1a132

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
......@@ -2011,12 +2011,6 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize {
20112011 }
20122012}
20132013
2014/// Warning: libc is defined to have incompatible integer types with the
2015/// corresponding kernel data structures for this syscall.
2016///
2017/// Warning: on 64-bit systems, if any message length would exceed `maxInt(i32)`,
2018/// number of bytes sent cannot be determined, because the kernel uses `ssize_t`
2019/// for `sendmsg` return value but `int` for the corresponding values here.
20202014pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize {
20212015 return syscall4(.sendmmsg, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(msgvec), vlen, flags);
20222016}