summaryrefslogtreecommitdiffstats
path: root/libvncclient/sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/sockets.c')
-rw-r--r--libvncclient/sockets.c5
1 files changed, 5 insertions, 0 deletions
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>