From 29d4de53d6bb970050981d6c0f5fd38372b31345 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 1 Oct 2025 14:30:49 -0700 Subject: [PATCH] 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. --- lib/std/os/linux.zig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 01cef6da31..2b792453a1 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -2011,12 +2011,6 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize { } } -/// Warning: libc is defined to have incompatible integer types with the -/// corresponding kernel data structures for this syscall. -/// -/// Warning: on 64-bit systems, if any message length would exceed `maxInt(i32)`, -/// number of bytes sent cannot be determined, because the kernel uses `ssize_t` -/// for `sendmsg` return value but `int` for the corresponding values here. pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize { return syscall4(.sendmmsg, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(msgvec), vlen, flags); }