From f115c382a0b0cc9299e73bcb8a11ad97c5fe7c57 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Sun, 26 Dec 2021 21:37:31 +0300 Subject: Fix build on recent FreeBSD. Recent FreeBSD versions gained the sched_getaffinity function, which made two mutually exclusive #ifdef blocks to be enabled. --- rts/posix/OSThreads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/posix/OSThreads.c') diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 862e6007a6..20064910ad 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -331,7 +331,7 @@ getNumberOfProcessors (void) nproc = 1; } } -#elif defined(freebsd_HOST_OS) +#elif defined(freebsd_HOST_OS) && !defined(HAVE_SCHED_GETAFFINITY) cpuset_t mask; CPU_ZERO(&mask); if(cpuset_getaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, sizeof(mask), &mask) == 0) { -- cgit v1.2.1