]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: config: avoid a build warning on numa_detect_topology() without threads
authorWilly Tarreau <w@1wt.eu>
Fri, 14 May 2021 06:30:46 +0000 (08:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 May 2021 06:30:46 +0000 (08:30 +0200)
The function is defined when using linux+cpu affinity but is only used
if threads are enabled, so let's add this condition to avoid aa build
warning about an unused function when building with thread disabled.
This came in 2.4-dev17 with commit b56a7c89a ("MEDIUM: cfgparse: detect
numa and set affinity if needed") so no backport is needed.

src/cfgparse.c

index 4b484bcdad45118cb05a06af59cc41721196da91..8132e47e8b976f131ef674b7b5edaf4c84aa5526 100644 (file)
@@ -2380,7 +2380,7 @@ void propagate_processes(struct proxy *from, struct proxy *to)
        }
 }
 
-#if defined(__linux__) && defined USE_CPU_AFFINITY
+#if defined(USE_THREAD) && defined(__linux__) && defined USE_CPU_AFFINITY
 /* filter directory name of the pattern node<X> */
 static int numa_filter(const struct dirent *dir)
 {