Commit 30592827 authored by Daniel Cohen Gindi's avatar Daniel Cohen Gindi Committed by Johannes Schindelin

Include Winsock2 header before windows.h include

That's because there are duplicate #defines, and when Winsock2 is defined
before windows.h then windows.h detects that and prevent redefinition.

See
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a90b143-1fb8-43e9-a54c-956127e0c579/windowsh-and-winsock2h?forum=windowssdk

[JES: fixed commit message]
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 914460ca
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
* vncviewer.c - the Xt-based VNC viewer. * vncviewer.c - the Xt-based VNC viewer.
*/ */
#ifdef WIN32
#undef SOCKET
#include <winsock2.h>
#endif
#ifdef __STRICT_ANSI__ #ifdef __STRICT_ANSI__
#define _BSD_SOURCE #define _BSD_SOURCE
#define _POSIX_SOURCE #define _POSIX_SOURCE
...@@ -44,8 +49,6 @@ static void DummyRect(rfbClient* client, int x, int y, int w, int h) { ...@@ -44,8 +49,6 @@ static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
static char* NoPassword(rfbClient* client) { static char* NoPassword(rfbClient* client) {
return strdup(""); return strdup("");
} }
#undef SOCKET
#include <winsock2.h>
#define close closesocket #define close closesocket
#else #else
#include <stdio.h> #include <stdio.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment