void-packages/srcpkgs/libusb/patches/portability-fixes.patch

17 lines
353 B
Diff
Raw Normal View History

2014-01-11 15:36:29 +00:00
--- libusb/io.c.orig 2014-01-11 16:34:55.811463881 +0100
+++ libusb/io.c 2014-01-11 16:35:26.138281377 +0100
@@ -34,6 +34,13 @@
#include <sys/timerfd.h>
#endif
+#ifndef TIMESPEC_TO_TIMEVAL
+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+}
+#endif
+
#include "libusbi.h"
/**