Created
August 27, 2012 07:10
-
-
Save jedisct1/3486404 to your computer and use it in GitHub Desktop.
fix-timeout-comp.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/opendnscache/lib-opendnscache/fdevent_kqueue.c b/opendnscache/lib-opendnscache/fdevent_kqueue.c | |
index df3d645..f77c015 100644 | |
--- a/opendnscache/lib-opendnscache/fdevent_kqueue.c | |
+++ b/opendnscache/lib-opendnscache/fdevent_kqueue.c | |
@@ -92,7 +92,7 @@ fdevent_wait(int64_t deadline, int64_t now) | |
timeout = 0; | |
} | |
timeout_ts.tv_sec = timeout / 1000; | |
- timeout_ts.tv_nsec = timeout % 1000; | |
+ timeout_ts.tv_nsec = (timeout % 1000) * 1000000; | |
if ((ready = kevent(kqueuefd, NULL, 0, t_events, events_len, | |
timeout_ts_p)) < 0 | |
&& errno != EINTR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment