zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 1e2be14b6b77c0d13480fad49aa9445eb18213d7 (tree)
parent 65b7d2b4e1b82e98410520cbcfa029b205a37d92
Author: Bill Nagel <bill@axzez.com>
Date:   Mon, 11 Jan 2021 23:39:45 -0500

define nfds_t for windows

Diffstat:
Mlib/std/os/bits/windows.zig | 1+
Mlib/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 @@ -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 @@ -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(