authorgravatar for zach@raineri.softwareZachary Raineri <zach@raineri.software> 2023-07-25 08:20:43-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-25 11:04:10-07:00
logdc98b001f3740c00adb663f3ffac5bd5838cfe4f
tree5dbd450805a3c1ec9e078c7b089a93eaf35c09df
parent32e78e239f7571a7383c38913f45f66e065e4018

std.os.linux | Fix sendmmsg function | Issue #16513

Closes #16513

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

lib/std/os/linux.zig+1-1
...@@ -1268,7 +1268,7 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize {...@@ -1268,7 +1268,7 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize {
1268}1268}
12691269
1270pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize {1270pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize {
1271 if (@typeInfo(usize).Int.bits > @typeInfo(@TypeOf(mmsghdr(undefined).msg_len)).Int.bits) {1271 if (@typeInfo(usize).Int.bits > @typeInfo(@typeInfo(mmsghdr).Struct.fields[1].type).Int.bits) {
1272 // workaround kernel brokenness:1272 // workaround kernel brokenness:
1273 // if adding up all iov_len overflows a i32 then split into multiple calls1273 // if adding up all iov_len overflows a i32 then split into multiple calls
1274 // see https://www.openwall.com/lists/musl/2014/06/07/51274 // see https://www.openwall.com/lists/musl/2014/06/07/5