X-Git-Url: http://git.meshlink.io/?p=catta;a=blobdiff_plain;f=src%2Fcompat%2Fwindows%2Fwincompat.h;fp=src%2Fcompat%2Fwindows%2Fwincompat.h;h=6d6f414ec5c32d9c51eb4c2bbb7d43b6c0e93224;hp=ac151c9ecf7bca078e185e41793db801234bd48f;hb=851f0397ec46b3e5969d1b4299dd151830699bb2;hpb=5f77c7c2c4e2013e75cc39de4de32eddd3227d33 diff --git a/src/compat/windows/wincompat.h b/src/compat/windows/wincompat.h index ac151c9..6d6f414 100644 --- a/src/compat/windows/wincompat.h +++ b/src/compat/windows/wincompat.h @@ -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);