]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: thread: fix builds without thread support
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 21 Oct 2026 14:55:49 +0000 (16:55 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 21 Oct 2026 14:42:31 +0000 (16:42 +0200)
Commit 4312f13a2 ("OPTIM: fd: Make each thread group's FD table NUMA-local")
added an unconditional call to thread_bind_to_cpu_map() from init_pollers(),
but the helper is only defined with USE_THREAD. Building with TARGET=generic
thus fails with an implicit declaration and an undefined reference.

Add a no-op stub alongside the other non-threaded helpers.

include/haproxy/thread.h

index f3f49daf0fafce871326d2d8d7d695915260f04d..c322bef4ab4011db1620dc48fdf69226f8ec15ac 100644 (file)
@@ -167,6 +167,10 @@ static inline void set_thread_cpu_affinity()
 {
 }
 
+static inline void thread_bind_to_cpu_map(uint tgrp, uint ltid)
+{
+}
+
 static inline unsigned long long ha_get_pthread_id(unsigned int thr)
 {
        return 0;