summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2019-12-27 18:50:27 +0100
committerLudovic Rousseau <ludovic.rousseau@free.fr>2019-12-28 18:05:13 +0100
commit1e9d26a753a741bfdb0769b4c895697d16edcc27 (patch)
tree4b0e62ce996bbca24d41645b59c9614bfc2c80de
parent53572d7e5eee79266139399924c7491174be1670 (diff)
downloadlibusb-1e9d26a753a741bfdb0769b4c895697d16edcc27.tar.gz
core: include sys/time.h on any GNU libc OS
GNU libc provides sys/time.h, so unconditionally include it when using that libc. Since sys/time.h is already included on a number of OSes, include it to minimize the differences between OSes when using libusb. Arguably, sources using functions from sys/time.h (such as gettimeofday) ought to already include it on their own; OTOH, let's avoid making such issues OS-specific.
-rw-r--r--libusb/libusb.h2
-rw-r--r--libusb/version_nano.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 8a6b0bf..d2535d0 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -54,7 +54,7 @@ typedef unsigned __int32 uint32_t;
#include <sys/types.h>
#endif
-#if defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__HAIKU__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__HAIKU__) || defined(__GLIBC__)
#include <sys/time.h>
#endif
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 4150474..ba3fee6 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11415
+#define LIBUSB_NANO 11416