Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a windows compilation warning in socket module (#538)
  • Loading branch information
Arkshine committed Sep 1, 2018
1 parent 879b061 commit e0ca2c9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/sockets/sockets.cpp
Expand Up @@ -15,15 +15,18 @@
#include <amtl/am-string.h>

#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <WinSock2.h>
#include <WS2tcpip.h>

#undef errno
#undef close

#define errno WSAGetLastError()
#define close(sockfd) closesocket(sockfd)

#undef EINPROGRESS
#undef EWOULDBLOCK

#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
#else
Expand Down

0 comments on commit e0ca2c9

Please sign in to comment.