X-Git-Url: http://git.meshlink.io/?p=catta;a=blobdiff_plain;f=src%2Fcompat%2Fwindows%2Fwincompat.h;h=69de64d06e7f13ce733ad554d91a79b367543be4;hp=6d6f414ec5c32d9c51eb4c2bbb7d43b6c0e93224;hb=2a2f2cfc63df6d90a7731ceba113edf9be53bab6;hpb=62e72dc30b5527372d1d73ef4ce4bc8ffb782451 diff --git a/src/compat/windows/wincompat.h b/src/compat/windows/wincompat.h index 6d6f414..69de64d 100644 --- a/src/compat/windows/wincompat.h +++ b/src/compat/windows/wincompat.h @@ -105,10 +105,15 @@ static inline struct cmsghdr *CMSG_NXTHDR(struct msghdr *m, struct cmsghdr *c) { #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 + #ifndef _SSIZE_T_DEFINED + #define _SSIZE_T_DEFINED + #undef ssize_t + #ifdef _WIN64 + typedef signed __int64 ssize_t; + #else + typedef signed int ssize_t; + #endif + #endif #endif ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);