libusb.h: Simplify condition governing the inclusion of sys/time.h
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 16 Apr 2020 21:31:18 +0000 (14:31 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 16 Apr 2020 21:31:18 +0000 (14:31 -0700)
The expression for the condition grows each time a new backend is added,
but it can be simplified if changed to key off of the _MSC_VER macro.
The sys/time.h header is ubiquitous across all platforms and build
environments except Visual Studio, so change the condition to be based
on this. This fixes builds on BSD where the condition was not evaluating
to true.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/libusb.h
libusb/version_nano.h

index 2452d73..058569e 100644 (file)
@@ -38,7 +38,7 @@ typedef SSIZE_T ssize_t;
 #include <limits.h>
 #include <stdint.h>
 #include <sys/types.h>
-#if defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__HAIKU__) || defined(__GLIBC__)
+#if !defined(_MSC_VER)
 #include <sys/time.h>
 #endif
 #include <time.h>
index ac0929f..0e6fc9c 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11495
+#define LIBUSB_NANO 11496