Use local type declaration for POSIX standard type only for MS compiler 1119/head
authorStefan Weil <sw@weilnetz.de>
Mon, 18 Jun 2018 12:06:25 +0000 (14:06 +0200)
committerStefan Weil <sw@weilnetz.de>
Mon, 18 Jun 2018 12:48:08 +0000 (14:48 +0200)
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>
src/lib/openjpip/sock_manager.c

index ec2455e8f6d943b6c297a4abdd9d961174211684..a776cedbb66fea90e824e1ac982bc833c1f4e1be 100644 (file)
@@ -30,7 +30,9 @@
 
 #ifdef _WIN32
 #include <windows.h>
+#ifdef _MSC_VER
 typedef SSIZE_T ssize_t;
+#endif
 #else
 #include <sys/types.h>
 #include <sys/socket.h>