From 1e2be14b6b77c0d13480fad49aa9445eb18213d7 Mon Sep 17 00:00:00 2001 From: Bill Nagel Date: Mon, 11 Jan 2021 23:39:45 -0500 Subject: [PATCH] define nfds_t for windows --- lib/std/os/bits/windows.zig | 1 + lib/std/os/windows.zig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/std/os/bits/windows.zig b/lib/std/os/bits/windows.zig index dbc42103ab..28a6a251f8 100644 --- a/lib/std/os/bits/windows.zig +++ b/lib/std/os/bits/windows.zig @@ -243,6 +243,7 @@ pub const IPPROTO_UDP = ws2_32.IPPROTO_UDP; pub const IPPROTO_ICMPV6 = ws2_32.IPPROTO_ICMPV6; pub const IPPROTO_RM = ws2_32.IPPROTO_RM; +pub const nfds_t = c_ulong; pub const pollfd = ws2_32.pollfd; pub const POLLRDNORM = ws2_32.POLLRDNORM; diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 1ed40e1f4f..f0530e53b2 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -1311,8 +1311,8 @@ pub fn recvfrom(s: ws2_32.SOCKET, buf: [*]u8, len: usize, flags: u32, from: ?*ws } } -pub fn poll(fds: [*]ws2_32.pollfd, n: usize, timeout: i32) i32 { - return ws2_32.WSAPoll(fds, @intCast(u32, n), timeout); +pub fn poll(fds: [*]ws2_32.pollfd, n: c_ulong, timeout: i32) i32 { + return ws2_32.WSAPoll(fds, n, timeout); } pub fn WSAIoctl(