diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 3 | ||||
-rw-r--r-- | compat/mingw.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index df0fa03194..c5c37e53ce 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1310,8 +1310,7 @@ static int WSAAPI getaddrinfo_stub(const char *node, const char *service, else ai->ai_canonname = NULL; - sin = xmalloc(ai->ai_addrlen); - memset(sin, 0, ai->ai_addrlen); + sin = xcalloc(1, ai->ai_addrlen); sin->sin_family = AF_INET; /* Note: getaddrinfo is supposed to allow service to be a string, * which should be looked up using getservbyname. This is diff --git a/compat/mingw.h b/compat/mingw.h index 3851857c2d..df0e3203ab 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -35,6 +35,9 @@ typedef int socklen_t; #ifndef EWOULDBLOCK #define EWOULDBLOCK EAGAIN #endif +#ifndef ELOOP +#define ELOOP EMLINK +#endif #define SHUT_WR SD_SEND #define SIGHUP 1 |