Skip to content

Commit

Permalink
package/libmemcached: fix build with gcc 4.8
Browse files Browse the repository at this point in the history
Fix the following build failure with gcc 4.8 raised since bump to
version 1.1.4 in commit 7205df8:

/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 <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
ffontaine authored and jacmet committed Dec 3, 2023
1 parent 4cf5d91 commit 5eb79ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/libmemcached/libmemcached.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5eb79ff

Please sign in to comment.