[02/11] batctl: Fix inconsistent use of _GNU_SOURCE
Commit Message
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(-)
Comments
On Tuesday, September 10, 2013 11:11:53 PM Sven Eckelmann wrote:
> 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(-)
Applied in revision db34e02.
Thanks,
Marek
@@ -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
@@ -21,7 +21,6 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdint.h>
#include <limits.h>
@@ -20,7 +20,6 @@
*/
-#define _GNU_SOURCE
#include <netinet/ether.h>
#include <arpa/inet.h>
#include <sys/socket.h>