From c53f5e78fcd0c6af9174c76d381a44aa48fb4f24 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 21 Aug 2025 11:16:01 +0200 Subject: [PATCH] package/proftpd: fix build w/ gcc-15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The source code contains a number of variables named 'bool', which conflicts with the C23 keyword. This is fixed upstream in 1.3.9 with https://github.com/proftpd/proftpd/commit/61be7eb14f200b97804a3cfa85fed51661067c62 but that unfortunately does not cleanly backport to 1.3.8, so instead use -std=gnu18 when building with GCC >= 15 to fix the following issues: table.c:1280:31: error: ‘bool’ cannot be used here 1280 | int table_handling_signal(int bool) { | ^~~~ table.c:1280:31: note: ‘bool’ is a keyword with ‘-std=c23’ onwards Signed-off-by: Peter Korsgaard Signed-off-by: Thomas Petazzoni --- package/proftpd/proftpd.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk index 84a499a5c0..d450489cb0 100644 --- a/package/proftpd/proftpd.mk +++ b/package/proftpd/proftpd.mk @@ -27,6 +27,14 @@ PROFTPD_CONF_OPTS = \ --with-gnu-ld \ --without-openssl-cmdline +# source code contains a number of variables named 'bool', which +# conflicts with the C23 keyword. Fixed upstream in 1.3.9 with +# https://github.com/proftpd/proftpd/commit/61be7eb14f200b97804a3cfa85fed51661067c62 +# so can be dropped when bumping to that +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y) +PROFTPD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu18" +endif + ifeq ($(BR2_PACKAGE_LIBIDN2),y) PROFTPD_DEPENDENCIES += libidn2 endif