* [B.A.T.M.A.N.] [PATCH] alfred: Enable _GNU_SOURCE by default
@ 2016-09-23 14:35 Sven Eckelmann
2016-10-14 13:33 ` Simon Wunderlich
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2016-09-23 14:35 UTC (permalink / raw)
To: b.a.t.m.a.n
alfred uses any netlink library which is (more or less) compatible with
libnl-3. This is for example libnl-tiny on OpenWrt.
Programs and libraries which are build against libnl-tiny must be build
with _GNU_SOURCE enabled to have some types in its headers defined. Thus
_GNU_SOURCE is enabled in the OpenWrt alfred package since 2016.3. But
sometimes using _GNU_SOURCE and sometimes not using it can have severe side
effects which are non-trivial to debug when the developer is not also using
the same _GNU_SOURCE preprocessor define. Thus enable _GNU_SOURCE by
default to have similar behavior (defines, type definitions, structure
members, ...) from headers like on OpenWrt.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Makefile | 1 +
gpsd/Makefile | 1 +
vis/Makefile | 1 +
3 files changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 6daa904..552e690 100755
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,7 @@ MANPAGE = man/alfred.8
# alfred flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
+CPPFLAGS += -D_GNU_SOURCE
LDLIBS += -lrt
# Turn on alfred capability dropping by default - set this to n if you don't want/need it
diff --git a/gpsd/Makefile b/gpsd/Makefile
index bae5660..b6172d9 100755
--- a/gpsd/Makefile
+++ b/gpsd/Makefile
@@ -25,6 +25,7 @@ MANPAGE = man/alfred-gpsd.8
# alfred flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
+CPPFLAGS += -D_GNU_SOURCE
# disable verbose output
ifneq ($(findstring $(MAKEFLAGS),s),s)
diff --git a/vis/Makefile b/vis/Makefile
index fd99f49..22483a5 100755
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -27,6 +27,7 @@ MANPAGE = man/batadv-vis.8
# batadv-vis flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
+CPPFLAGS += -D_GNU_SOURCE
LDLIBS += -lrt
# disable verbose output
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-14 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 14:35 [B.A.T.M.A.N.] [PATCH] alfred: Enable _GNU_SOURCE by default Sven Eckelmann
2016-10-14 13:33 ` Simon Wunderlich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox