From dc98b001f3740c00adb663f3ffac5bd5838cfe4f Mon Sep 17 00:00:00 2001 From: Zachary Raineri Date: Tue, 25 Jul 2023 08:20:43 -0500 Subject: [PATCH] std.os.linux | Fix sendmmsg function | Issue #16513 Closes #16513 --- lib/std/os/linux.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 500ef5d6f0..4335bba009 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1268,7 +1268,7 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize { } pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize { - if (@typeInfo(usize).Int.bits > @typeInfo(@TypeOf(mmsghdr(undefined).msg_len)).Int.bits) { + if (@typeInfo(usize).Int.bits > @typeInfo(@typeInfo(mmsghdr).Struct.fields[1].type).Int.bits) { // workaround kernel brokenness: // if adding up all iov_len overflows a i32 then split into multiple calls // see https://www.openwall.com/lists/musl/2014/06/07/5