]> git.meshlink.io Git - catta/blobdiff - src/compat/windows/wincompat.h
fix gcc mingw compile (gcc 5.1 x86_64)
[catta] / src / compat / windows / wincompat.h
index ac151c9ecf7bca078e185e41793db801234bd48f..6d6f414ec5c32d9c51eb4c2bbb7d43b6c0e93224 100644 (file)
@@ -103,10 +103,12 @@ static inline struct cmsghdr *CMSG_NXTHDR(struct msghdr *m, struct cmsghdr *c) {
 #undef CMSG_DATA
 #define CMSG_DATA(c) WSA_CMSG_DATA(c)
 
-// VS2012 and up has no ssize_t defined, before it was defined as unsigned int
-#ifndef _SSIZE_T
-#define _SSIZE_T
-typedef signed int        ssize_t;
+#ifdef _MSC_VER
+   // VS2012 and up has no ssize_t defined, before it was defined as unsigned int
+   #ifndef _SSIZE_T
+   #define _SSIZE_T
+   typedef signed int        ssize_t;
+   #endif
 #endif
 
 ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);