From 234cd4e669a3ae6d2a36f1d2f4cfcd1f9d44bd7f Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 24 Sep 2018 19:58:53 +0200 Subject: [PATCH] Add required feature flags for when building with -std=c11 These feature flags are required to build with modern GCC that default to newser C standard. However, we should never enforce a standard on the user -- there are far too many old/embedded systems out there with very old toolchains that just want bug fixes and minor features for an otherwise stable system. Signed-off-by: Joachim Nilsson --- src/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 186268c..e9153ba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,8 +21,10 @@ sbin_PROGRAMS = syslogd klogd AM_CFLAGS = -fomit-frame-pointer -fno-strength-reduce -Wno-unused-result syslogd_SOURCES = syslogd.c pidfile.c pidfile.h -syslogd_CPPFLAGS = -DSYSV -DFSSTND -DSYSLOG_INET -DINET6 -DNO_SCCS -DSYSLOG_UNIXAF +syslogd_CPPFLAGS = -DSYSV -DFSSTND -DSYSLOG_INET -DINET6 -DNO_SCCS -DSYSLOG_UNIXAF \ + -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -klogd_SOURCES = klogd.c klogd.h syslog.c pidfile.c pidfile.h \ +klogd_SOURCES = klogd.c klogd.h syslog.c pidfile.c pidfile.h \ ksym.c ksyms.h ksym_mod.c module.h -klogd_CPPFLAGS = -DSYSV -DFSSTND -DALLOW_KERNEL_LOGGING +klogd_CPPFLAGS = -DSYSV -DFSSTND -DALLOW_KERNEL_LOGGING \ + -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE