]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: debug: add missed guard USE_CPU_AFFINITY to show cpu bindings
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 21 Jul 2025 09:07:47 +0000 (11:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 21 Jul 2025 09:25:08 +0000 (11:25 +0200)
Not all platforms support thread-cpu bindings, so let's put
cpu_topo_dump_summary() under USE_CPU_AFFINITY guards.

Only needs to be backported if 1cc0e023ce ("MINOR: debug: add thread-cpu
bindings info in 'show dev' output") is backported.

src/debug.c

index d7a2851ab1b6bdabc977b08c081a8f6b242f67bc..58db0b487502e6d8093a583c8e93a7ed0c5afdd6 100644 (file)
@@ -34,7 +34,9 @@
 #include <haproxy/cfgparse.h>
 #include <haproxy/cli.h>
 #include <haproxy/clock.h>
+#ifdef USE_CPU_AFFINITY
 #include <haproxy/cpu_topo.h>
+#endif
 #include <haproxy/debug.h>
 #include <haproxy/fd.h>
 #include <haproxy/global.h>
@@ -751,8 +753,9 @@ static int debug_parse_cli_show_dev(char **args, char *payload, struct appctx *a
        chunk_appendf(&trash, "  %-22s  %-11s  %-11s \n", "    ram limit (hard):",
                LIM2A(normalize_rlim((ulong)post_mortem.process.boot_lim_ram.rlim_max), "unlimited"),
                LIM2A(normalize_rlim((ulong)post_mortem.process.run_lim_ram.rlim_max), "unlimited"));
-
+#ifdef USE_CPU_AFFINITY
        cpu_topo_dump_summary(ha_cpu_topo, &trash);
+#endif
 
        ha_free(&err);