summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/vncauth.c1
-rw-r--r--libvncclient/rfbproto.c1
-rw-r--r--libvncclient/sockets.c5
-rw-r--r--libvncserver/httpd.c5
-rw-r--r--libvncserver/rfbserver.c2
-rw-r--r--libvncserver/sockets.c6
-rw-r--r--libvncserver/websockets.c1
7 files changed, 19 insertions, 2 deletions
diff --git a/common/vncauth.c b/common/vncauth.c
index 82c1b68..0b20f53 100644
--- a/common/vncauth.c
+++ b/common/vncauth.c
@@ -24,6 +24,7 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
+#define _XOPEN_SOURCE 600
#endif
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index 505ef50..d18459e 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -26,6 +26,7 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
+#define _XOPEN_SOURCE 600
#endif
#ifndef WIN32
#include <unistd.h>
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
index 6c47491..c97a90f 100644
--- a/libvncclient/sockets.c
+++ b/libvncclient/sockets.c
@@ -24,6 +24,11 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
+#ifdef __linux__
+/* Setting this on other systems hides definitions such as INADDR_LOOPBACK.
+ * The check should be for __GLIBC__ in fact. */
+# define _POSIX_SOURCE
+#endif
#endif
#include <unistd.h>
#include <errno.h>
diff --git a/libvncserver/httpd.c b/libvncserver/httpd.c
index ed91e46..792a52b 100644
--- a/libvncserver/httpd.c
+++ b/libvncserver/httpd.c
@@ -23,6 +23,11 @@
* USA.
*/
+#ifdef __STRICT_ANSI__
+#define _BSD_SOURCE
+#define _POSIX_SOURCE
+#endif
+
#include <rfb/rfb.h>
#include <ctype.h>
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index cc398f2..ad64ac1 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -28,6 +28,8 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
+#define _POSIX_SOURCE
+#define _XOPEN_SOURCE 600
#endif
#include <string.h>
#include <rfb/rfb.h>
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 2345248..ddd8450 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -43,7 +43,11 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
-#define _POSIX_SOURCE
+#ifdef __linux__
+/* Setting this on other systems hides definitions such as INADDR_LOOPBACK.
+ * The check should be for __GLIBC__ in fact. */
+# define _POSIX_SOURCE
+#endif
#endif
#include <rfb/rfb.h>
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index f7e3d04..043e6cb 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -28,7 +28,6 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
-#define _POSIX_SOURCE
#endif
#include <rfb/rfb.h>