--- work/libusb-1.0.9-orig/libusb/io.c 2014-09-14 23:33:05.286816058 +0200 +++ work/libusb-1.0.9/libusb/io.c 2014-09-14 23:35:13.255450621 +0200 @@ -1046,6 +1046,15 @@ * give up the events lock if instructed. */ +/* Android workaround */ +#ifndef TIMESPEC_TO_TIMEVAL +#define TIMESPEC_TO_TIMEVAL(tv, ts) \ + do { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ + } while(0) +#endif /* end of TIMESPEC_TO_TIMEVAL */ + int usbi_io_init(struct libusb_context *ctx) { int r;