std: fix compile error bitrot

These were revealed in an earlier commit in this branch that removed a
workaround disabling Windows std lib files from being tested.
This commit is contained in:
Andrew Kelley 2022-12-10 18:47:02 -07:00
parent d1ad126e34
commit dd4ca88ca7
3 changed files with 3 additions and 3 deletions

View File

@ -1983,7 +1983,7 @@ pub fn loadWinsockExtensionFunction(comptime T: type, sock: ws2_32.SOCKET, guid:
ws2_32.SIO_GET_EXTENSION_FUNCTION_POINTER, ws2_32.SIO_GET_EXTENSION_FUNCTION_POINTER,
@ptrCast(*const anyopaque, &guid), @ptrCast(*const anyopaque, &guid),
@sizeOf(GUID), @sizeOf(GUID),
&function, @intToPtr(?*anyopaque, @ptrToInt(function)),
@sizeOf(T), @sizeOf(T),
&num_bytes, &num_bytes,
null, null,

View File

@ -2344,6 +2344,6 @@ pub extern "ws2_32" fn getnameinfo(
Flags: i32, Flags: i32,
) callconv(WINAPI) i32; ) callconv(WINAPI) i32;
pub extern "IPHLPAPI" fn if_nametoindex( pub extern "iphlpapi" fn if_nametoindex(
InterfaceName: [*:0]const u8, InterfaceName: [*:0]const u8,
) callconv(WINAPI) u32; ) callconv(WINAPI) u32;

View File

@ -27,7 +27,7 @@ pub fn Mixin(comptime Socket: type) type {
return switch (ws2_32.WSAGetLastError()) { return switch (ws2_32.WSAGetLastError()) {
.WSANOTINITIALISED => { .WSANOTINITIALISED => {
_ = try windows.WSAStartup(2, 2); _ = try windows.WSAStartup(2, 2);
return Socket.init(domain, socket_type, protocol, flags); return init(domain, socket_type, protocol, flags);
}, },
.WSAEAFNOSUPPORT => error.AddressFamilyNotSupported, .WSAEAFNOSUPPORT => error.AddressFamilyNotSupported,
.WSAEMFILE => error.ProcessFdQuotaExceeded, .WSAEMFILE => error.ProcessFdQuotaExceeded,