From 883b351351e5d5e7cf13f6f112af5f5d8c250497 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 14 Jan 2021 12:50:51 +0100 Subject: [PATCH] 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 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 7e60f74..4422c28 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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