package/exim: fix build error during install step
authorLuca Ceresoli <luca@lucaceresoli.net>
Mon, 10 Feb 2020 21:48:40 +0000 (22:48 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 11 Feb 2020 22:30:20 +0000 (23:30 +0100)
exim builds some files during the 'make install' step, and these fail with
an error:

  lookups/lf_quote.c:49:3: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int j = 0; j < vlength; j++)
     ^

Fix by passing the -std=c99 here, as it is already passed in the build
step.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/exim/exim.mk

index 0ad9a8de8000a802f8614de706e3a8612f4feb32..e4b0bfc1b4881911360468444f2ebd0e411cf14b 100644 (file)
@@ -135,7 +135,9 @@ endef
 # something when installing...
 define EXIM_INSTALL_TARGET_CMDS
        DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
-         $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) install
+         $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) \
+               CFLAGS="-std=c99 $(TARGET_CFLAGS)" \
+               install
        chmod u+s $(TARGET_DIR)/usr/sbin/exim
 endef