event: don't redefine error codes

Error codes can be defined in visual studio. Unconditional redefine
causes warnings.
This commit is contained in:
Dmitry Podgorny
2020-01-07 00:14:59 +02:00
parent b2e6458736
commit 2570084cae

View File

@@ -41,9 +41,15 @@
#define _sleep(x) usleep((x) * 1000)
#else
#include <winsock2.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#endif
#ifndef ECONNRESET
#define ECONNRESET WSAECONNRESET
#endif
#ifndef ECONNABORTED
#define ECONNABORTED WSAECONNABORTED
#endif
#define _sleep(x) Sleep(x)
#endif