diff options
Diffstat (limited to 'libusb/io.c')
-rw-r--r-- | libusb/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libusb/io.c b/libusb/io.c index e9bd312..0b876d1 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1046,6 +1046,13 @@ printf("completed!\n"); * give up the events lock if instructed. */ +#if !defined(TIMESPEC_TO_TIMEVAL) +#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (long)(ts)->tv_sec; \ + (tv)->tv_usec = (long)(ts)->tv_nsec / 1000; \ +} +#endif + int usbi_io_init(struct libusb_context *ctx) { int r; |