Commit 7d353bbe authored by Max Kellermann's avatar Max Kellermann

configure.ac: always define _GNU_SOURCE on Linux

Make sure glibc gives us all features.
parent 5696f91a
...@@ -90,6 +90,9 @@ linux-android*) ...@@ -90,6 +90,9 @@ linux-android*)
linux*) linux*)
host_is_linux=yes host_is_linux=yes
linux_auto=auto linux_auto=auto
dnl allow using all glibc features
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
;; ;;
mingw32* | windows*) mingw32* | windows*)
......
...@@ -18,11 +18,6 @@ ...@@ -18,11 +18,6 @@
*/ */
#include "config.h" #include "config.h"
#ifdef HAVE_STRUCT_UCRED
#define _GNU_SOURCE 1
#endif
#include "ServerSocket.hxx" #include "ServerSocket.hxx"
#include "system/SocketUtil.hxx" #include "system/SocketUtil.hxx"
#include "system/SocketError.hxx" #include "system/SocketError.hxx"
......
...@@ -29,10 +29,6 @@ ...@@ -29,10 +29,6 @@
#include "config.h" /* must be first for large file support */ #include "config.h" /* must be first for large file support */
#include "fd_util.h" #include "fd_util.h"
#if !defined(_GNU_SOURCE) && (defined(HAVE_PIPE2) || defined(HAVE_ACCEPT4))
#define _GNU_SOURCE
#endif
#include <assert.h> #include <assert.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -42,10 +42,6 @@ ...@@ -42,10 +42,6 @@
#include <stddef.h> #include <stddef.h>
#ifndef WIN32 #ifndef WIN32
#if !defined(_GNU_SOURCE) && (defined(HAVE_PIPE2) || defined(HAVE_ACCEPT4))
#define _GNU_SOURCE
#endif
#include <sys/types.h> #include <sys/types.h>
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment