From 96eaeb428daad3c2cef5a1d5db16bedcfe9aa639 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 1 Sep 2012 21:14:53 +0200 Subject: [PATCH] define _GNU_SOURCE on the command line that way it is already set in configure and can thus be used by tests. --- configure.in | 2 ++ src/compat/isync.h | 2 -- src/compat/main.c | 1 - src/isync.h | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 36b07d0..6c080aa 100644 --- a/configure.in +++ b/configure.in @@ -9,6 +9,8 @@ if test "$GCC" = yes; then CFLAGS="$CFLAGS -pipe -W -Wall -Wshadow -Wstrict-prototypes" fi +CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + AC_CHECK_HEADERS(sys/poll.h sys/select.h) AC_CHECK_FUNCS(vasprintf) diff --git a/src/compat/isync.h b/src/compat/isync.h index 2bb0030..86dddef 100644 --- a/src/compat/isync.h +++ b/src/compat/isync.h @@ -18,8 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#define _GNU_SOURCE - #include #include diff --git a/src/compat/main.c b/src/compat/main.c index 1b21f0e..1220e5a 100644 --- a/src/compat/main.c +++ b/src/compat/main.c @@ -35,7 +35,6 @@ #include #ifdef HAVE_GETOPT_LONG -# define _GNU_SOURCE # include struct option Opts[] = { {"write", 0, NULL, 'w' }, diff --git a/src/isync.h b/src/isync.h index 0e1e9c3..eba562b 100644 --- a/src/isync.h +++ b/src/isync.h @@ -21,8 +21,6 @@ * despite that library's more restrictive license. */ -#define _GNU_SOURCE - #include #include