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.