X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompat%2Fwindows%2Fwincompat.h;fp=src%2Fcompat%2Fwindows%2Fwincompat.h;h=69de64d06e7f13ce733ad554d91a79b367543be4;hb=cab98272649ebd0c6b6760a1f267ca113abec02d;hp=6d6f414ec5c32d9c51eb4c2bbb7d43b6c0e93224;hpb=62e72dc30b5527372d1d73ef4ce4bc8ffb782451;p=catta 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);