From fbf48c65f343c2d3cce8ccd69975e9526f209fc5 Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Sat, 20 Sep 2014 16:39:16 +0300 Subject: `strings.h` and `resolv.h` are not available on MSVC, and some POSIX functions are renamed or deprecated For all of those missing/deprecated POSIX functions, we just add a macro mapping to the _underscored version of MSVC. --- libvncserver/rfbserver.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libvncserver/rfbserver.c') diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index df7d74c..4056318 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -83,6 +83,13 @@ #include "rfbssl.h" #endif +#ifdef _MSC_VER +#define snprintf _snprintf /* Missing in MSVC */ +/* Prevent POSIX deprecation warnings */ +#define close _close +#define strdup _strdup +#endif + #ifdef __MINGW32__ static int compat_mkdir(const char *path, int mode) { -- cgit v1.2.1