server: FreeBSD 14-CURRENT's sched_setaffinity() needs _WITH_CPU_SET_T defined.

FreeBSD 14-CURRENT got the non-standard sched_setaffinity() function, but
it uses FreeBSD's cpuset_t type instead of Linux's cpu_set_t (also
non-standard). This breaks the build. We have to define _WITH_CPU_SET_T
before including <sched.h> to get that type named cpu_set_t instead.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Damjan Jovanovic 2021-12-06 03:52:13 +02:00 committed by Alexandre Julliard
parent 36af18a4f1
commit 316a358b0f
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,8 @@
#include <time.h>
#include <poll.h>
#ifdef HAVE_SCHED_H
/* FreeBSD needs this for cpu_set_t intead of its cpuset_t */
#define _WITH_CPU_SET_T
#include <sched.h>
#endif