]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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:03:28 +0000 (16:03 +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
                      ^

include/haproxy/cpuset-t.h

index 984df8d839cd0b779b976742139245f17cfc7ec0..b770b17912efb72211c64a8d9aff4b98532c5de2 100644 (file)
@@ -16,7 +16,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