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 a5fda69..1520fb7 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -40,6 +40,13 @@ #include "libusbi.h" #include "hotplug.h" +#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 + /** * \page io Synchronous and asynchronous device I/O * |