summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 8237254..5819c1d 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -21,6 +21,11 @@
* vncviewer.c - the Xt-based VNC viewer.
*/
+#ifdef WIN32
+#undef SOCKET
+#include <winsock2.h>
+#endif
+
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
@@ -44,8 +49,6 @@ static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
static char* NoPassword(rfbClient* client) {
return strdup("");
}
-#undef SOCKET
-#include <winsock2.h>
#define close closesocket
#else
#include <stdio.h>