summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
authorDaniel Cohen Gindi <danielgindi@gmail.com>2014-09-20 16:39:16 +0300
committerDaniel Cohen Gindi <danielgindi@gmail.com>2014-09-20 17:46:30 +0300
commitfbf48c65f343c2d3cce8ccd69975e9526f209fc5 (patch)
treec29ca641088bdd76a07d3cedf5aae66fbde6ff3c /libvncclient/vncviewer.c
parentfdf5f8876f5f4bd08aa3dc47268c1f4c4590c0bb (diff)
downloadlibtdevnc-fbf48c65f343c2d3cce8ccd69975e9526f209fc5.tar.gz
libtdevnc-fbf48c65f343c2d3cce8ccd69975e9526f209fc5.zip
`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.
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 9d657ed..b12116c 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -26,6 +26,10 @@
#include <winsock2.h>
#endif
+#ifdef _MSC_VER
+#define strdup _strdup /* Prevent POSIX deprecation warnings */
+#endif
+
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE