From 8cff11d815a3c054d4f254931f8a14efab71aa3d Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 13 Sep 2014 23:27:40 +0200 Subject: rtlsdr-flarm buildscript for android --- patches/libusb-timespec.diff | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/libusb-timespec.diff (limited to 'patches/libusb-timespec.diff') diff --git a/patches/libusb-timespec.diff b/patches/libusb-timespec.diff new file mode 100644 index 0000000..709daf0 --- /dev/null +++ b/patches/libusb-timespec.diff @@ -0,0 +1,18 @@ +--- 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; -- cgit v1.2.1