Use local type declaration for POSIX standard type only for MS compiler
ssize_t is a POSIX type which is declared in POSIX include files. Mingw-w64 provides it also for Windows. Use the local declaration only with MS compilers. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
fd205f457b
commit
4aaf52ec8d
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
typedef SSIZE_T ssize_t;
|
typedef SSIZE_T ssize_t;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
Loading…
Reference in New Issue