From: Paul Cercueil Date: Wed, 6 Oct 2021 13:31:24 +0000 (+0100) Subject: Windows: Fix ssize_t unconditionally defined X-Git-Tag: upstream/1.0.25~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=619c28f37efec41e12d7de67f869fa24c82bc21f;p=platform%2Fupstream%2Flibusb.git 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 --- 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 typedef SSIZE_T ssize_t; +#endif /* _SSIZE_T_DEFINED */ #endif /* _MSC_VER */ #include 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