From: Fabian Groffen Date: Sat, 31 May 2025 08:49:28 +0000 (+0200) Subject: lib: cpu-count - fix compilation using musl X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=951e371b6e44e2051de83c9fe73c778858fa73a1;p=thirdparty%2Fdovecot%2Fcore.git lib: cpu-count - fix compilation using musl The macros, types and symbols CPU_* and cpuset_t are not exposed in musl's sched.h unless _GNU_SOURCE is set. Signed-off-by: Fabian Groffen --- diff --git a/src/lib/cpu-count.c b/src/lib/cpu-count.c index 3eb38fa47d..a3e80e6c15 100644 --- a/src/lib/cpu-count.c +++ b/src/lib/cpu-count.c @@ -3,6 +3,8 @@ #ifdef HAVE_SCHED_H # define __USE_GNU +/* _GNU_SOURCE: for musl's sched.h to expose cpuset/CPU_* */ +# define _GNU_SOURCE # include # ifdef HAVE_SYS_CPUSET_H # include