diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-08-25 00:00:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-09-01 17:54:06 -0700 |
| commit | 7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435 (patch) | |
| tree | 5e3a36e5d74e2d07706b817953e74f13a67c272d /lib/std/event | |
| parent | c09ba8796c64a0bd3a39d6545b852c1b2e91f473 (diff) | |
| download | zig-7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435.tar.gz zig-7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435.zip | |
std.os: more reorganization efforts
* std lib tests are passing on x86_64-linux with and without -lc
* stage2 is building from source on x86_64-linux
* down to 38 remaining uses of `usingnamespace`
Diffstat (limited to 'lib/std/event')
| -rw-r--r-- | lib/std/event/loop.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 50fb76ec9d..ef19728ec9 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -457,8 +457,8 @@ pub const Loop = struct { // Fall back to a blocking poll(). Ideally this codepath is never hit, since // epoll should be just fine. But this is better than incorrect behavior. var poll_flags: i16 = 0; - if ((flags & os.EPOLLIN) != 0) poll_flags |= os.POLLIN; - if ((flags & os.EPOLLOUT) != 0) poll_flags |= os.POLLOUT; + if ((flags & os.EPOLLIN) != 0) poll_flags |= os.POLL.IN; + if ((flags & os.EPOLLOUT) != 0) poll_flags |= os.POLL.OUT; var pfd = [1]os.pollfd{os.pollfd{ .fd = fd, .events = poll_flags, @@ -903,12 +903,12 @@ pub const Loop = struct { /// will return a value greater than was supplied to the call. addr_size: *os.socklen_t, /// The following values can be bitwise ORed in flags to obtain different behavior: - /// * `SOCK_CLOEXEC` - Set the close-on-exec (`FD_CLOEXEC`) flag on the new file descriptor. See the + /// * `SOCK.CLOEXEC` - Set the close-on-exec (`FD_CLOEXEC`) flag on the new file descriptor. See the /// description of the `O_CLOEXEC` flag in `open` for reasons why this may be useful. flags: u32, ) os.AcceptError!os.socket_t { while (true) { - return os.accept(sockfd, addr, addr_size, flags | os.SOCK_NONBLOCK) catch |err| switch (err) { + return os.accept(sockfd, addr, addr_size, flags | os.SOCK.NONBLOCK) catch |err| switch (err) { error.WouldBlock => { self.waitUntilFdReadable(sockfd); continue; |
