From e0ca2c967cf6df7e87eb637a59ce4ed09f567dad Mon Sep 17 00:00:00 2001 From: Vincent Herbet Date: Sat, 1 Sep 2018 12:30:12 +0200 Subject: [PATCH] Fix a windows compilation warning in socket module (#538) --- modules/sockets/sockets.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/sockets/sockets.cpp b/modules/sockets/sockets.cpp index 7b3ed87791..16b26b0dc6 100644 --- a/modules/sockets/sockets.cpp +++ b/modules/sockets/sockets.cpp @@ -15,8 +15,8 @@ #include #ifdef _WIN32 - #include - #include + #include + #include #undef errno #undef close @@ -24,6 +24,9 @@ #define errno WSAGetLastError() #define close(sockfd) closesocket(sockfd) + #undef EINPROGRESS + #undef EWOULDBLOCK + #define EINPROGRESS WSAEINPROGRESS #define EWOULDBLOCK WSAEWOULDBLOCK #else