hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 567121abf3244212b1495007879a323499661251
parent 6d25b191a372cad1e5b544e95ba103a7f2a8783d
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 20 Oct 2021 11:08:25 +0200

unix::poll: fix INDEF usage

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Munix/poll/+linux.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/unix/poll/+linux.ha b/unix/poll/+linux.ha @@ -38,7 +38,8 @@ export fn poll( ) (uint | errors::error) = { let ts = rt::timespec { ... }; time::duration_to_timespec(timeout, &ts); - match (rt::ppoll(fds: *[*]pollfd, len(fds), &ts, null)) { + let ts = if (timeout == INDEF) null else &ts; + match (rt::ppoll(fds: *[*]pollfd, len(fds), ts, null)) { case err: rt::errno => return errors::errno(err); case n: int =>