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