Fix win32 build
The types size_t and ssize_t are defined on Windows (in MSYS2), so there is no need to typedef SIZE_T and SSIZE_T. Exit code is "unsigned long" both on Windows 32 and 64 bits. See <https://github.com/Genymobile/scrcpy/issues/46#issuecomment-373603596>.
This commit is contained in:
parent
f16bd88802
commit
821ec9843c
2 changed files with 1 additions and 4 deletions
|
@ -7,12 +7,11 @@
|
||||||
|
|
||||||
// <https://stackoverflow.com/a/44383330/1987178>
|
// <https://stackoverflow.com/a/44383330/1987178>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# define PRIexitcode "lu"
|
||||||
# ifdef _WIN64
|
# ifdef _WIN64
|
||||||
# define PRIsizet PRIu64
|
# define PRIsizet PRIu64
|
||||||
# define PRIexitcode "lu"
|
|
||||||
# else
|
# else
|
||||||
# define PRIsizet PRIu32
|
# define PRIsizet PRIu32
|
||||||
# define PRIexitcode "u"
|
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define PRIsizet "zu"
|
# define PRIsizet "zu"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
#define SHUT_RD SD_RECEIVE
|
#define SHUT_RD SD_RECEIVE
|
||||||
#define SHUT_WR SD_SEND
|
#define SHUT_WR SD_SEND
|
||||||
#define SHUT_RDWR SD_BOTH
|
#define SHUT_RDWR SD_BOTH
|
||||||
typedef SIZE_T size_t;
|
|
||||||
typedef SSIZE_T ssize_t;
|
|
||||||
typedef SOCKET socket_t;
|
typedef SOCKET socket_t;
|
||||||
#else
|
#else
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|
Loading…
Reference in a new issue