summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <[email protected]>2012-09-11 22:50:12 +0300
committerChristian Beier <[email protected]>2012-09-14 18:47:23 +0200
commit8f1ef3d66cb846ed003b9f88bc56ef3b4859953e (patch)
tree12bbb1e4d4ab9c2c0d0111e4ae9f01c6c3c9dbd9
parent3cbef1a976731bb3a714ee13cbd1813ed142ae5e (diff)
downloadlibtdevnc-8f1ef3d66cb846ed003b9f88bc56ef3b4859953e.tar.gz
libtdevnc-8f1ef3d66cb846ed003b9f88bc56ef3b4859953e.zip
Add some missing feature macro definitions.
Building with -ansi failed due to some code (as well as system headers) using non-C89 features. Fix that by adding the usual _POSIX_SOURCE and _BSD_SOURCE definitions already present in some other files.
-rw-r--r--libvncserver/sockets.c5
-rw-r--r--libvncserver/websockets.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 15b40ac..2345248 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -41,6 +41,11 @@
* USA.
*/
+#ifdef __STRICT_ANSI__
+#define _BSD_SOURCE
+#define _POSIX_SOURCE
+#endif
+
#include <rfb/rfb.h>
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index 6bad3aa..f7e3d04 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -26,6 +26,11 @@
* USA.
*/
+#ifdef __STRICT_ANSI__
+#define _BSD_SOURCE
+#define _POSIX_SOURCE
+#endif
+
#include <rfb/rfb.h>
#include <resolv.h> /* __b64_ntop */
/* errno */