Either all or no source file should define _GNU_SOURCE to avoid incompatible types or function declarations.
Signed-off-by: Sven Eckelmann sven@narfation.org --- Makefile | 1 + bat-hosts.c | 1 - functions.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 1961298..7926db3 100755 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ MANPAGE = man/batctl.8
# batctl flags and options CFLAGS += -Wall -W -std=gnu99 -fno-strict-aliasing -MD +CPPFLAGS += -D_GNU_SOURCE LDLIBS += -lm
# disable verbose output diff --git a/bat-hosts.c b/bat-hosts.c index f0adb9c..ee862da 100644 --- a/bat-hosts.c +++ b/bat-hosts.c @@ -21,7 +21,6 @@
-#define _GNU_SOURCE #include <stdio.h> #include <stdint.h> #include <limits.h> diff --git a/functions.c b/functions.c index 0359287..2a2f392 100644 --- a/functions.c +++ b/functions.c @@ -20,7 +20,6 @@ */
-#define _GNU_SOURCE #include <netinet/ether.h> #include <arpa/inet.h> #include <sys/socket.h>