diff mbox series

[v2,3/3] package/exim: fix build error during install step

Message ID 20200210214840.15023-4-luca@lucaceresoli.net
State Accepted
Headers show
Series packages/exim: fix build failures | expand

Commit Message

Luca Ceresoli Feb. 10, 2020, 9:48 p.m. UTC
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>

---
Changes since v1: none.
---
 package/exim/exim.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Peter Korsgaard Feb. 11, 2020, 10:30 p.m. UTC | #1
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:

 > 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>

 > ---
 > Changes since v1: none.

Committed, thanks.
diff mbox series

Patch

diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 0ad9a8de8000..e4b0bfc1b488 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -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