From: Olivier Houchard Date: Wed, 10 Jun 2026 08:23:18 +0000 (+0200) Subject: BUILD: servers: Fix build with -std=gnu89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c75202b480de2053f848aba144a74ec3b25b3ce;p=thirdparty%2Fhaproxy.git BUILD: servers: Fix build with -std=gnu89 Commit 3c923d075 introduced a C99ism by declaring a variable in a for loop, don't do that, especially since there already is a variable named "i" declared. This should fix the build when -std=c89 is used. This should be backported if commit 3c923d075 is backported. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 5e54500e6..d1cb5af6f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2486,7 +2486,7 @@ init_proxies_list_stage1: /* At this point, target names have already been resolved. */ /***********************************************************/ - for (int i = 0; i < global.nbthread; i++) { + for (i = 0; i < global.nbthread; i++) { idle_conn_srv[i] = EB_ROOT; idle_conn_task[i] = task_new_on(i); if (!idle_conn_task[i]) {