Hi,
I intentionally did two separated patches about FreeBSD and
USE_CPU_AFFINITY. The first is just to fix a build issue, the second to
enable it by default.
The first patch might need to be backported to 1.8.
Hope it s good.
Kind regards.
From 52603a51797dafbd197de2558631ff134176cb5e Mon Sep 17 00:00:00 2001
From: David Carlier
Date: Wed, 29 Nov 2017 11:02:32 +
Subject: [PATCH 1/2] BUILD/MINOR: haproxy : FreeBSD/cpu affinity needs
pthread_np header
for pthread_*_np calls, pthread_np.h is needed under FreeBSD.
---
src/haproxy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/haproxy.c b/src/haproxy.c
index 891a021d..a1fe550e 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -55,6 +55,7 @@
#ifdef __FreeBSD__
#include
#include
+#include
#endif
#endif
--
2.15.0
From 18e2aeaec99b573e53667959f8064870d2bd7837 Mon Sep 17 00:00:00 2001
From: David Carlier
Date: Wed, 29 Nov 2017 11:05:12 +
Subject: [PATCH 2/2] BUILD/MINOR: Makefile : enabling USE_CPU_AFFINITY
FreeBSD can handle cpuset matters just fine, we can hence enable it
by default as linux2628 TARGET.
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 26b55db9..2acf5028 100644
--- a/Makefile
+++ b/Makefile
@@ -324,6 +324,7 @@ ifeq ($(TARGET),freebsd)
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
USE_THREAD = implicit
+ USE_CPU_AFFINITY= implicit
else
ifeq ($(TARGET),osx)
# This is for Mac OS/X
--
2.15.0