From 8175f428dc003b6a4564deee7ae78bc3b3b62ebf Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Mon, 1 Sep 2014 01:28:12 +0300 Subject: Use correct winsock header We link to ws2_32.lib which corresponds to the winsock2.h header, not the winsock.h header. [JES: fixed commit message] Signed-off-by: Johannes Schindelin --- rfb/rfbproto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index fe46c3e..540f79f 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -65,7 +65,7 @@ #define LIBVNCSERVER_WORDS_BIGENDIAN #define rfbBool int #include -#include +#include #undef SOCKET #define SOCKET int #else -- cgit v1.2.3 From e26aeb4062ed410e76d3230aed0940a8d0945c07 Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Fri, 29 Aug 2014 10:59:56 +0300 Subject: MSVC: Use the Unix emulation headers [JES: provided commit message, split out unrelated changes] Signed-off-by: Johannes Schindelin --- libvncclient/tls_openssl.c | 8 +++++++- rfb/rfbproto.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'rfb') diff --git a/libvncclient/tls_openssl.c b/libvncclient/tls_openssl.c index 8af96a4..a1b771e 100644 --- a/libvncclient/tls_openssl.c +++ b/libvncclient/tls_openssl.c @@ -32,6 +32,8 @@ #include "tls.h" #ifdef _MSC_VER +#include // That's for SSIZE_T +typedef SSIZE_T ssize_t; #define snprintf _snprintf #endif @@ -308,7 +310,11 @@ return TRUE; if (ret != -1) { rfbClientLog("TLS handshake blocking.\n"); - sleep(1); +#ifdef WIN32 + Sleep(1000); +#else + sleep(1); +#endif timeout--; continue; } diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 540f79f..4169fd6 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -108,6 +108,10 @@ typedef int8_t rfbBool; #define TRUE -1 #endif +#ifdef _MSC_VER +#include +#endif + typedef uint32_t rfbKeySym; typedef uint32_t rfbPixel; -- cgit v1.2.3