krakjoe / apcu

APCu - APC User Cache
Other
959 stars 194 forks source link

Build error in Centos7 #438

Closed LMSBrubaker closed 1 year ago

LMSBrubaker commented 2 years ago

hello,

with the actual source from the master i am getting the followiing error.

/root/rpmbuild/BUILD/apcu/apc_cache.c: In function 'apc_cache_info': /root/rpmbuild/BUILD/apcu/apc_cache.c:1097:4: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t i = 0; i < cache->nslots; i++) {

previous builds just work fine, so whats happening or what did i have to change?

nikic commented 2 years ago

Probably AC_PROG_CC_C99 should be added to config.m4. You should be able to work around this by adding -std=c99 to CFLAGS.

remicollet commented 1 year ago

Fixed by ab01a6e30d5b232f69a9ab12b0fb3069d3306862 (will be in 5.1.22)