alfred: Enable _GNU_SOURCE by default
PATCH 1/1 alfred: Enable _GNU_SOURCE by default
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.
--- Makefile | 1 + gpsd/Makefile | 1 + vis/Makefile | 1 + 3 files changed, 3 insertions(+)
Makefile +1 -0
@@ -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
gpsd/Makefile +1 -0
@@ -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)
vis/Makefile +1 -0
@@ -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
Signature · 1 line
2.9.3
Simon Wunderlich
AppliedQuoted 12 lines · CEST Sven Eckelmann
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_SOURCEenabled to have some types in its headers defined. Thus_GNU_SOURCEis enabled in the OpenWrt alfred package since 2016.3. But sometimes using_GNU_SOURCEand 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_SOURCEpreprocessor define. Thus enable_GNU_SOURCEby default to have similar behavior (defines, type definitions, structure members, ...) from headers like on OpenWrt.
Quoted 1 line
Signed-off-by Sven Eckelmann <[email protected]>
Applied in revision 415ebc7
Thanks!
Simon