BUILD: fix recent build breakage of freebsd caused by kFreeBSD build fix
authorDavid Carlier <devnexen@gmail.com>
Tue, 8 Mar 2022 14:49:29 +0000 (14:49 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Mar 2022 15:14:18 +0000 (16:14 +0100)
Supporting kFreebsd previously led to FreeBSD (< 14) build breakage:

 In file included from src/cpuset.c:5:
 In file included from include/haproxy/cpuset.h:4:
 include/haproxy/cpuset-t.h:46:2: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'?
         CPUSET_REPR cpuset;
         ^~~~~~~~~~~
         cpuset_t
 include/haproxy/cpuset-t.h:21:22: note: expanded from macro 'CPUSET_REPR'
 # define CPUSET_REPR cpu_set_t
                      ^

(cherry picked from commit 6709538068752ead403648ac5836f610d2da79e8)
Signed-off-by: Willy Tarreau <w@1wt.eu>

include/haproxy/cpuset-t.h

index 3709821..e3734a7 100644 (file)
@@ -15,7 +15,8 @@
 
 #include <haproxy/api-t.h>
 
-#if defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+#if defined(__linux__) || defined(__DragonFly__) || \
+  (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 
 # define CPUSET_REPR cpu_set_t
 # define CPUSET_USE_CPUSET