From 130fc7ef751e665de14b440a3b5a3ee75d2312e0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 7 Jan 2026 20:57:18 -0800 Subject: [PATCH] std.c: use {} rather than void for absent functions --- lib/std/c.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index da499e63328c6095ac84436e6ce216cb9b3237bd..0cf52edbb3cbb5299d16edc2db85b4eb200dfec6 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -10579,7 +10579,7 @@ pub const socket = switch (native_os) { pub const socketpair = switch (native_os) { // https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/#unsupported\unavailable: - .windows => void, + .windows => {}, else => private.socketpair, }; @@ -10766,11 +10766,10 @@ pub extern "c" fn recvfrom( ) if (native_os == .windows) c_int else isize; pub const recvmsg = switch (native_os) { - // Windows: Technically, a form of recvmsg() exists for Windows, but the - // user has to install some kind of callback for it. I'm not sure if/how - // we can map this to normal recvmsg() interface use. + // Technically, a form of recvmsg() exists for Windows, but the user has to + // install some kind of callback for it. // https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_wsarecvmsg - .windows => void, + .windows => {}, else => private.recvmsg, }; -- 2.54.0