From 193c7de505039750f973cd2a73c57677e884de9e Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 25 Aug 2015 15:32:25 +0200 Subject: [PATCH] Remove BSD-ism: TIMEVAL_TO_TIMESPEC(). Systems like CloudABI implement kqueue() but do not provide the BSD-specific TIMEVAL_TO_TIMESPEC() macro. Change the code to perform this manually, as it is not hard to do this conversion. --- kqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kqueue.c b/kqueue.c index 7780e1f1..aa2dcb7b 100644 --- a/kqueue.c +++ b/kqueue.c @@ -260,7 +260,8 @@ kq_dispatch(struct event_base *base, struct timeval *tv) int i, n_changes, res; if (tv != NULL) { - TIMEVAL_TO_TIMESPEC(tv, &ts); + ts.tv_sec = tv->tv_sec; + ts.tv_nsec = tv->tv_usec * 1000; ts_p = &ts; } -- 2.40.0