mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 10:28:48 +00:00
std: Fix poll definitions for FreeBSD/Darwin
This commit is contained in:
parent
dc810eb73b
commit
2c16a96686
@ -1461,7 +1461,7 @@ pub const LOCK_EX = 2;
|
||||
pub const LOCK_UN = 8;
|
||||
pub const LOCK_NB = 4;
|
||||
|
||||
pub const nfds_t = usize;
|
||||
pub const nfds_t = u32;
|
||||
pub const pollfd = extern struct {
|
||||
fd: fd_t,
|
||||
events: i16,
|
||||
|
@ -1480,3 +1480,28 @@ pub const rlimit = extern struct {
|
||||
pub const SHUT_RD = 0;
|
||||
pub const SHUT_WR = 1;
|
||||
pub const SHUT_RDWR = 2;
|
||||
|
||||
pub const nfds_t = u32;
|
||||
|
||||
pub const pollfd = extern struct {
|
||||
fd: fd_t,
|
||||
events: i16,
|
||||
revents: i16,
|
||||
};
|
||||
|
||||
/// any readable data available.
|
||||
pub const POLLIN = 0x0001;
|
||||
/// OOB/Urgent readable data.
|
||||
pub const POLLPRI = 0x0002;
|
||||
/// file descriptor is writeable.
|
||||
pub const POLLOUT = 0x0004;
|
||||
/// non-OOB/URG data available.
|
||||
pub const POLLRDNORM = 0x0040;
|
||||
/// no write type differentiation.
|
||||
pub const POLLWRNORM = POLLOUT;
|
||||
/// OOB/Urgent readable data.
|
||||
pub const POLLRDBAND = 0x0080;
|
||||
/// OOB/Urgent data can be written.
|
||||
pub const POLLWRBAND = 0x0100;
|
||||
/// like POLLIN, except ignore EOF.
|
||||
pub const POLLINIGNEOF = 0x2000;
|
||||
|
Loading…
Reference in New Issue
Block a user