firmware-utils: mkdlinkfw: fix build
authorMathias Kresin <dev@kresin.me>
Sun, 13 Jan 2019 18:28:54 +0000 (19:28 +0100)
committerMathias Kresin <dev@kresin.me>
Sun, 13 Jan 2019 18:28:54 +0000 (19:28 +0100)
While we don't need the gnu99 option anymore, we still need to force the
c99 standard to fix the following build error on the build bots:

src/mkdlinkfw.c: In function 'find_auh_headers':
src/mkdlinkfw.c:267:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < header_counter; i++) {
   ^
src/mkdlinkfw.c:267:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

Signed-off-by: Mathias Kresin <dev@kresin.me>
tools/firmware-utils/Makefile

index a2f698622b275de129da0edd763df6177ed450e4..68782f3802a3cadafc0a0047180fa7154811be79 100644 (file)
@@ -82,7 +82,7 @@ define Host/Compile
        $(call cc,mkbuffaloimg, -Wall)
        $(call cc,zyimage, -Wall)
        $(call cc,mkdhpimg buffalo-lib, -Wall)
        $(call cc,mkbuffaloimg, -Wall)
        $(call cc,zyimage, -Wall)
        $(call cc,mkdhpimg buffalo-lib, -Wall)
-       $(call cc,mkdlinkfw mkdlinkfw-lib, -lz -Wall)
+       $(call cc,mkdlinkfw mkdlinkfw-lib, -lz -Wall --std=c99)
        $(call cc,dns313-header, -Wall)
        $(call cc,mksercommfw, -Wall --std=gnu99)
 endef
        $(call cc,dns313-header, -Wall)
        $(call cc,mksercommfw, -Wall --std=gnu99)
 endef