From b336dda0765ba345253ed4b25113a5db4386c3f0 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Wed, 6 May 2020 15:36:52 +0200 Subject: [PATCH] Standard library: Fix a regression in loop.waitUntilFdWritableOrReadable This broke async io on linux. Regressed in 8ebcca6734e07aea29098ca4c63c0216b3099d0e --- lib/std/event/loop.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 15e7a3481c..04859b6205 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -493,7 +493,7 @@ pub const Loop = struct { pub fn waitUntilFdWritableOrReadable(self: *Loop, fd: os.fd_t) void { switch (builtin.os.tag) { .linux => { - self.linuxWaitFd(@intCast(usize, fd), os.EPOLLET | os.EPOLLONESHOT | os.EPOLLOUT | os.EPOLLIN); + self.linuxWaitFd(fd, os.EPOLLET | os.EPOLLONESHOT | os.EPOLLOUT | os.EPOLLIN); }, .macosx, .freebsd, .netbsd, .dragonfly => { self.bsdWaitKev(@intCast(usize, fd), os.EVFILT_READ, os.EV_ONESHOT);