From d2140bf0f2280bb3a0a31c7c3f5225b7787016b3 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 6 Apr 2019 20:29:35 +0200 Subject: [PATCH] firmware-utils: fix nec-enc build on older architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch enable gnu99 mode for the nec-enc utility which fixes the following build-breaking errors on some older architectures. nec-enc.c: In function ‘xor_data’: nec-enc.c:34:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < len; i++) { ^~~ nec-enc.c:34:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code nec-enc.c: In function ‘main’: nec-enc.c:101:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < n; i++) { ^~~ Spotted-By: Buildbot Fixes: fac27643f057 ("firmware-utils: add nec-enc") Signed-off-by: Christian Lamparter --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7745b7b..76d5929 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ define Host/Compile $(call cc,mkdlinkfw mkdlinkfw-lib, -lz -Wall --std=c99) $(call cc,dns313-header, -Wall) $(call cc,mksercommfw, -Wall) - $(call cc,nec-enc, -Wall) + $(call cc,nec-enc, -Wall --std=gnu99) endef define Host/Install -- 2.30.2