configure.ac: always define _GNU_SOURCE on Linux

Make sure glibc gives us all features.
This commit is contained in:
Max Kellermann 2014-03-15 18:24:46 +01:00
parent 5696f91a1e
commit 7d353bbe2a
4 changed files with 3 additions and 13 deletions

View File

@ -90,6 +90,9 @@ linux-android*)
linux*)
host_is_linux=yes
linux_auto=auto
dnl allow using all glibc features
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
;;
mingw32* | windows*)

View File

@ -18,11 +18,6 @@
*/
#include "config.h"
#ifdef HAVE_STRUCT_UCRED
#define _GNU_SOURCE 1
#endif
#include "ServerSocket.hxx"
#include "system/SocketUtil.hxx"
#include "system/SocketError.hxx"

View File

@ -29,10 +29,6 @@
#include "config.h" /* must be first for large file support */
#include "fd_util.h"
#if !defined(_GNU_SOURCE) && (defined(HAVE_PIPE2) || defined(HAVE_ACCEPT4))
#define _GNU_SOURCE
#endif
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -42,10 +42,6 @@
#include <stddef.h>
#ifndef WIN32
#if !defined(_GNU_SOURCE) && (defined(HAVE_PIPE2) || defined(HAVE_ACCEPT4))
#define _GNU_SOURCE
#endif
#include <sys/types.h>
#endif