diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-02 02:37:17 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-02 02:37:22 +0400 |
commit | e7825661a2a5239c05bf0e250cd0d9c1eed6419d (patch) | |
tree | 4a78514e0514760617d9b7323ff8b2230566ff94 /uloop.c | |
parent | 7157c3a4df70965c5652f957ebdbbe116260d480 (diff) |
uloop: fix immediate timeout processing on mac os x
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uloop.c')
-rw-r--r-- | uloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -136,12 +136,12 @@ static void uloop_run_events(int timeout) struct timespec ts; int nfds, n; - if (timeout > 0) { + if (timeout >= 0) { ts.tv_sec = timeout / 1000; ts.tv_nsec = (timeout % 1000) * 1000000; } - nfds = kevent(poll_fd, NULL, 0, events, ARRAY_SIZE(events), timeout > 0 ? &ts : NULL); + nfds = kevent(poll_fd, NULL, 0, events, ARRAY_SIZE(events), timeout >= 0 ? &ts : NULL); for(n = 0; n < nfds; ++n) { struct uloop_fd *u = events[n].udata; |