Windows: Fix ssize_t unconditionally defined The standard procedure to define ssize_t on Windows is to wrap it around a check for the _SSIZE_T_DEFINED macro. If not done, it makes it impossible to use the libusb.h header along with other headers (from other libraries) that also attempt to define ssize_t. Closes #1007 Signed-off-by: Paul Cercueil <paul@crapouillou.net>
diff --git a/libusb/libusb.h b/libusb/libusb.h index 5ea699f..0b3d854 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h
@@ -31,8 +31,11 @@ #define inline __inline #endif /* ssize_t is also not available */ +#ifndef _SSIZE_T_DEFINED +#define _SSIZE_T_DEFINED #include <basetsd.h> typedef SSIZE_T ssize_t; +#endif /* _SSIZE_T_DEFINED */ #endif /* _MSC_VER */ #include <limits.h>
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 191a7e7..922dca9 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h
@@ -1 +1 @@ -#define LIBUSB_NANO 11659 +#define LIBUSB_NANO 11660