summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/poll.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/poll.c')
-rw-r--r--libc/sysdeps/linux/common/poll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index 4fc5a3267..47eb87d73 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -38,6 +38,10 @@ int __libc_poll(struct pollfd *fds, nfds_t nfds, int timeout)
tval.tv_sec = timeout / 1000;
tval.tv_nsec = (timeout % 1000) * 1000000;
ts = &tval;
+ } else if (timeout == 0) {
+ tval.tv_sec = 0;
+ tval.tv_nsec = 0;
+ ts = &tval;
}
return ppoll(fds, nfds, ts, NULL);
}