Fix a windows compilation warning in socket module (#538)

This commit is contained in:
Vincent Herbet 2018-09-01 12:30:12 +02:00 committed by GitHub
parent 879b061bc8
commit e0ca2c967c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,8 @@
#include <amtl/am-string.h> #include <amtl/am-string.h>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock2.h> #include <WinSock2.h>
#include <ws2tcpip.h> #include <WS2tcpip.h>
#undef errno #undef errno
#undef close #undef close
@ -24,6 +24,9 @@
#define errno WSAGetLastError() #define errno WSAGetLastError()
#define close(sockfd) closesocket(sockfd) #define close(sockfd) closesocket(sockfd)
#undef EINPROGRESS
#undef EWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS #define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK
#else #else