Patch libusb to compile on vs2015.
This commit is contained in:
parent
9b56efe57c
commit
00afa2a328
|
@ -43,11 +43,16 @@ typedef struct usbi_cond_t_ usbi_cond_t;
|
||||||
// We *were* getting timespec from pthread.h:
|
// We *were* getting timespec from pthread.h:
|
||||||
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
|
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
|
||||||
#define HAVE_STRUCT_TIMESPEC 1
|
#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
|
#define _TIMESPEC_DEFINED 1
|
||||||
struct timespec {
|
struct timespec {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_nsec;
|
long tv_nsec;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
|
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
|
||||||
|
|
||||||
// We *were* getting ETIMEDOUT from pthread.h:
|
// We *were* getting ETIMEDOUT from pthread.h:
|
||||||
|
|
Loading…
Reference in New Issue