diff options
author | Gleb Popov <6yearold@gmail.com> | 2021-12-26 21:37:31 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-08 05:31:05 -0500 |
commit | f115c382a0b0cc9299e73bcb8a11ad97c5fe7c57 (patch) | |
tree | 5b120b1bb5e16b30cf9a22e26069e7cd055bfe0c /rts/posix | |
parent | b713db1ec3f7c1fb660f157c421c99d4db4dfbd3 (diff) | |
download | haskell-f115c382a0b0cc9299e73bcb8a11ad97c5fe7c57.tar.gz |
Fix build on recent FreeBSD.
Recent FreeBSD versions gained the sched_getaffinity function, which made two
mutually exclusive #ifdef blocks to be enabled.
Diffstat (limited to 'rts/posix')
-rw-r--r-- | rts/posix/OSThreads.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |