BUG/MAJOR: fix build on musl with cpu_set_t support
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 27 Apr 2021 08:46:36 +0000 (10:46 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 27 Apr 2021 12:11:26 +0000 (14:11 +0200)
commitfc6ac53dca8391ba9c32bc716fb61267b475ba71
treec26f836686119849da33bf42776b305a7920fb33
parent9463f0e2220ec5b7a882b03a0fe7940cadf1cb29
BUG/MAJOR: fix build on musl with cpu_set_t support

Move cpu_map structure outside of the global struct to a global
variable defined in cpuset.c compilation unit. This allows to reorganize
the includes without having to define _GNU_SOURCE everywhere for the
support of the cpu_set_t.

This fixes the compilation with musl libc, most notably used for the
alpine based docker image.

This fixes the github issue #1235.

No need to backport as this feature is new in the current
2.4-dev.
include/haproxy/cpuset-t.h
include/haproxy/cpuset.h
include/haproxy/global-t.h
src/cfgparse-global.c
src/cpuset.c
src/haproxy.c