package/proftpd: fix build w/ gcc-15

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
61be7eb14f
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 <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Peter Korsgaard
2025-08-21 11:16:01 +02:00
committed by Thomas Petazzoni
parent 90be04d4d3
commit c53f5e78fc

View File

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