summaryrefslogtreecommitdiff
path: root/Externals
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2015-03-16 16:44:27 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2015-09-03 04:38:50 -0700
commit00afa2a3287c2c418ac8ac7739712e8d0b7e66c9 (patch)
tree184f9742f05057193e23ae7cc599b0c494feb3cc /Externals
parent9b56efe57c9275c38a6688608e86f04e29423d8c (diff)
Patch libusb to compile on vs2015.
Diffstat (limited to 'Externals')
-rw-r--r--Externals/libusb/libusb/os/threads_windows.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Externals/libusb/libusb/os/threads_windows.h b/Externals/libusb/libusb/os/threads_windows.h
index 2b829253b4..b28da25555 100644
--- a/Externals/libusb/libusb/os/threads_windows.h
+++ b/Externals/libusb/libusb/os/threads_windows.h
@@ -43,11 +43,16 @@ typedef struct usbi_cond_t_ usbi_cond_t;
// We *were* getting timespec from pthread.h:
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
#define HAVE_STRUCT_TIMESPEC 1
+// (shuffle2) see https://github.com/libusb/libusb/pull/60
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+#include <time.h>
+#else
#define _TIMESPEC_DEFINED 1
struct timespec {
long tv_sec;
long tv_nsec;
};
+#endif
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
// We *were* getting ETIMEDOUT from pthread.h: