diff options
author | Christian Beier <[email protected]> | 2017-01-28 17:59:52 +0100 |
---|---|---|
committer | Christian Beier <[email protected]> | 2017-01-28 17:59:52 +0100 |
commit | dede3aea22640d9b036f358b228aa611da6bc0d9 (patch) | |
tree | a0cfea7cc30af4f293cff1f9db9c7802be008551 | |
parent | 882c8f34779ac88a544d3020a90a677042fa7067 (diff) | |
download | libtdevnc-dede3aea22640d9b036f358b228aa611da6bc0d9.tar.gz libtdevnc-dede3aea22640d9b036f358b228aa611da6bc0d9.zip |
Fix LibVNCClient compilation with MSVC 2014
-rw-r--r-- | common/vncauth.c | 2 | ||||
-rw-r--r-- | libvncclient/listen.c | 4 | ||||
-rw-r--r-- | libvncclient/sockets.c | 2 | ||||
-rw-r--r-- | rfb/rfbclient.h | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/common/vncauth.c b/common/vncauth.c index 0b20f53..2a5d96f 100644 --- a/common/vncauth.c +++ b/common/vncauth.c @@ -31,7 +31,9 @@ #endif #include <stdio.h> #include <stdlib.h> +#ifdef LIBVNCSERVER_HAVE_UNISTD_H #include <unistd.h> +#endif #include <rfb/rfbproto.h> #include "d3des.h" diff --git a/libvncclient/listen.c b/libvncclient/listen.c index e989d6a..8674b3f 100644 --- a/libvncclient/listen.c +++ b/libvncclient/listen.c @@ -25,7 +25,9 @@ #ifdef __STRICT_ANSI__ #define _BSD_SOURCE #endif +#if LIBVNCSERVER_HAVE_UNISTD_H #include <unistd.h> +#endif #include <sys/types.h> #ifdef WIN32 #define close closesocket @@ -34,7 +36,9 @@ #include <sys/wait.h> #include <sys/utsname.h> #endif +#if LIBVNCSERVER_HAVE_SYS_TIME_H #include <sys/time.h> +#endif #include <rfb/rfbclient.h> /* diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index 8ddfd9d..1019580 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -30,7 +30,9 @@ # define _POSIX_SOURCE #endif #endif +#if LIBVNCSERVER_HAVE_UNISTD_H #include <unistd.h> +#endif #include <errno.h> #include <fcntl.h> #include <assert.h> diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index 4f6f4f4..9fdb008 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -38,8 +38,12 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#if LIBVNCSERVER_HAVE_SYS_TIME_H #include <sys/time.h> +#endif +#if LIBVNCSERVER_HAVE_UNISTD_H #include <unistd.h> +#endif #include <rfb/rfbproto.h> #include <rfb/keysym.h> |