package/libmemcached: fix build with gcc 4.8

Fix the following build failure with gcc 4.8 raised since bump to
version 1.1.4 in commit 7205df8a4f:

/home/buildroot/autobuild/run/instance-0/output-1/build/libmemcached-1.1.4/src/libmemcachedprotocol/ascii_handler.c: In function 'ascii_get_response_handler':
/home/buildroot/autobuild/run/instance-0/output-1/build/libmemcached-1.1.4/src/libmemcachedprotocol/ascii_handler.c:249:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int x = 0; x < keylen; ++x) {
   ^

Fixes:
 - http://autobuild.buildroot.org/results/202aeec4dda822ac341d8882f84f968a303697c3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2023-12-03 09:44:45 +01:00 committed by Peter Korsgaard
parent 4cf5d91d8b
commit 5eb79ff3b9

View File

@ -16,7 +16,9 @@ LIBMEMCACHED_CPE_ID_VENDOR = awesome
# Force Release otherwise libraries will be suffixed by -dbg which will raise
# unexpected build failures with packages that use libmemcached (e.g. c-icap)
LIBMEMCACHED_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release
LIBMEMCACHED_CONF_OPTS += \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -std=c99"
ifeq ($(BR2_PACKAGE_LIBEVENT),y)
LIBMEMCACHED_DEPENDENCIES += libevent