BUILD/MINOR: haproxy DragonFlyBSD affinity build update.
authorDavid Carlier <devnexen@gmail.com>
Wed, 2 Dec 2020 21:14:51 +0000 (21:14 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 08:24:58 +0000 (09:24 +0100)
sched_setaffinity supported by this platform.

(cherry picked from commit 2d0493af49fa2518bb53a260e0b04bc43d9683c3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/haproxy.c

index 019cc57..5e0fb18 100644 (file)
@@ -3427,7 +3427,7 @@ int main(int argc, char **argv)
                        }
                        ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset), &cpuset);
                }
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__DragonFly__)
                        sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map.proc[proc]);
 #endif
 #endif