diff options
author | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-08-29 10:59:56 +0300 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2014-09-02 16:43:17 +0200 |
commit | e26aeb4062ed410e76d3230aed0940a8d0945c07 (patch) | |
tree | 8de6b6bfa584e5c8d2abcc3bad88019ea795d1ef | |
parent | 366dda995182b3d4b199a3df262cdacb6d40cecc (diff) | |
download | libvncserver-e26aeb4062ed410e76d3230aed0940a8d0945c07.zip libvncserver-e26aeb4062ed410e76d3230aed0940a8d0945c07.tar.gz |
MSVC: Use the Unix emulation headers
[JES: provided commit message, split out unrelated changes]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r-- | libvncclient/tls_openssl.c | 8 | ||||
-rw-r--r-- | rfb/rfbproto.h | 4 |
2 files changed, 11 insertions, 1 deletions
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 <BaseTsd.h> // 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 <stdint.h> +#endif + typedef uint32_t rfbKeySym; typedef uint32_t rfbPixel; |