zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit bcb6760fa5a2dce29f917912a86ba3ba7414fccc (tree)
parent 3b80fde6f42f104278d4102562dd2b714aafe877
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed,  1 Oct 2025 14:30:49 -0700

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.

Diffstat:
Mlib/std/os/linux.zig | 6------
1 file changed, 0 insertions(+), 6 deletions(-)

diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig @@ -2079,12 +2079,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); }