summaryrefslogtreecommitdiffstats
path: root/libvncclient
diff options
context:
space:
mode:
authorTobias Junghans <tobydox@veyon.io>2018-11-06 10:32:14 +0100
committerTobias Junghans <tobydox@veyon.io>2018-11-06 10:32:14 +0100
commit09b2ed438177a86bcf29e01bf0851ce815b6ef8d (patch)
treefea75e60787d030f5fcd50ba9a1a10dc7734d6f5 /libvncclient
parent343eaabd7c910676a9985f1585e2cd4adebaaaa7 (diff)
downloadlibtdevnc-09b2ed438177a86bcf29e01bf0851ce815b6ef8d.tar.gz
libtdevnc-09b2ed438177a86bcf29e01bf0851ce815b6ef8d.zip
Undef error codes before redefining them for WSA
Fixes compiler warnings about redefined macros from errno.h.
Diffstat (limited to 'libvncclient')
-rw-r--r--libvncclient/sasl.c3
-rw-r--r--libvncclient/sockets.c3
2 files changed, 6 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)