Allow loop initial declarations, explicitly enable C99

Fixes the following error on certain buildroot toolchains:

    syslogd.c: In function 'fmt5424':
    syslogd.c:1583:2: error: 'for' loop initial declarations are only allowed in C99 mode
      for (int j = 25; j >= 20; --j) {
           ^

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2021-01-14 12:50:51 +01:00
parent f735f54714
commit 883b351351

View File

@ -33,7 +33,7 @@ if ENABLE_LOGGER
bin_PROGRAMS += logger
endif
AM_CFLAGS = -W -Wall -Wextra
AM_CFLAGS = -W -Wall -Wextra -std=c99
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter -fno-strict-aliasing
AM_CPPFLAGS = -DSYSCONFDIR=\"@sysconfdir@\" -DRUNSTATEDIR=\"@runstatedir@\"
AM_CPPFLAGS += -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE