define nfds_t for windows

This commit is contained in:
Bill Nagel 2021-01-11 23:39:45 -05:00 committed by Andrew Kelley
parent 65b7d2b4e1
commit 1e2be14b6b
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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(