]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: listener: fix 'for' loop inline variable declaration
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 11 Jun 2025 17:41:38 +0000 (19:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Jun 2025 06:46:36 +0000 (08:46 +0200)
commitb5067a972c6bbbe52344c76aed15f437f9bb5cdd
tree4c501a948f0b86729a7451c32b7b819ef8bf5f82
parent01f011faebb68a079a4fa16478d3b0d992b3bd3e
BUILD: listener: fix 'for' loop inline variable declaration

commit 16eb0fab3 ("MAJOR: counters: dispatch counters over thread groups")
introduced a build regression on some compilers:

  src/listener.c: In function 'listener_accept':
  src/listener.c:1095:3: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int it = 0; it < global.nbtgroups; it++)
     ^
  src/listener.c:1095:3: note: use option -std=c99 or -std=gnu99 to compile your code
  src/listener.c:1101:4: error: 'for' loop initial declarations are only allowed in C99 mode
      for (int it = 0; it < global.nbtgroups; it++) {
      ^
  make: *** [src/listener.o] Error 1
  make: *** Waiting for unfinished jobs....

Let's fix that.
No backport needed
src/listener.c