mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
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.
This commit is contained in:
parent
9354036dc2
commit
29d4de53d6
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user