diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-12-29 14:54:15 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-12-29 14:56:35 +0000 |
commit | 6fbf635a468fb86516effb0a3015b2e4736eb850 (patch) | |
tree | a452f01f08186ec52fc3b3eb91a72e25024e09d0 /libusb/io.c | |
parent | 89b5407b9aa74790a64b6f32a5b14a96242ba128 (diff) | |
download | libusb-6fbf635a468fb86516effb0a3015b2e4736eb850.tar.gz |
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 * |