From dd13b6f3f5eb44e8f21c2996ab721cb435b7bb81 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Thu, 27 Aug 2026 14:59:48 +0200 Subject: [PATCH] MINOR: haload: enable per-thread-group FD tables when available Add <_GNU_SOURCE> so is visible from . When it is, generate "expose-experimental-directives" and "tune.fd.tables per-thread-group" in the global section. --- src/haload_init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/haload_init.c b/src/haload_init.c index b5f15e218..5e86e3fac 100644 --- a/src/haload_init.c +++ b/src/haload_init.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include #include @@ -431,6 +432,11 @@ void haproxy_init_args(int argc, char **argv) hbuf_appendf(&gbuf, "global\n"); hbuf_appendf(&gbuf, "\ttune.memory.hot-size 3145728\n"); hbuf_appendf(&gbuf, "\tssl-server-verify none\n"); +#ifdef CLONE_FILES + /* required for "tune.fd.tables" below */ + hbuf_appendf(&gbuf, "\texpose-experimental-directives\n"); + hbuf_appendf(&gbuf, "\ttune.fd.tables per-thread-group\n"); +#endif if (hbuf_alloc(&buf) == NULL) { ha_alert("failed to allocate a buffer\n"); -- 2.47.3