diff options
author | Tobias Junghans <tobydox@veyon.io> | 2018-11-06 10:32:14 +0100 |
---|---|---|
committer | Tobias Junghans <tobydox@veyon.io> | 2018-11-06 10:32:14 +0100 |
commit | 09b2ed438177a86bcf29e01bf0851ce815b6ef8d (patch) | |
tree | fea75e60787d030f5fcd50ba9a1a10dc7734d6f5 | |
parent | 343eaabd7c910676a9985f1585e2cd4adebaaaa7 (diff) | |
download | libtdevnc-09b2ed438177a86bcf29e01bf0851ce815b6ef8d.tar.gz libtdevnc-09b2ed438177a86bcf29e01bf0851ce815b6ef8d.zip |
Undef error codes before redefining them for WSA
Fixes compiler warnings about redefined macros from errno.h.
-rw-r--r-- | libvncclient/sasl.c | 3 | ||||
-rw-r--r-- | libvncclient/sockets.c | 3 | ||||
-rw-r--r-- | libvncserver/sockets.c | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/libvncclient/sasl.c b/libvncclient/sasl.c index 0530307..db240c1 100644 --- a/libvncclient/sasl.c +++ b/libvncclient/sasl.c @@ -41,6 +41,9 @@ #ifdef WIN32 #undef SOCKET #include <winsock2.h> +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK +#endif #define EWOULDBLOCK WSAEWOULDBLOCK #define socklen_t int #define close closesocket diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index ed2deef..f042472 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -40,6 +40,9 @@ #ifdef WIN32 #undef SOCKET #include <winsock2.h> +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK +#endif #define EWOULDBLOCK WSAEWOULDBLOCK #define close closesocket #define read(sock,buf,len) recv(sock,buf,len,0) diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index bbc3d90..fe54a37 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -109,7 +109,13 @@ int deny_severity=LOG_WARNING; #pragma warning (disable: 4018 4761) #endif #define read(sock,buf,len) recv(sock,buf,len,0) +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK +#endif #define EWOULDBLOCK WSAEWOULDBLOCK +#ifdef ETIMEDOUT +#undef ETIMEDOUT +#endif #define ETIMEDOUT WSAETIMEDOUT #define write(sock,buf,len) send(sock,buf,len,0) #else |