[PATCH] server: FreeBSD 14-CURRENT's sched_setaffinity() needs _WITH_CPU_SET_T defined

Damjan Jovanovic damjan.jov at gmail.com
Sun Dec 5 19:52:13 CST 2021


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 at gmail.com>
---
 server/thread.c | 2 ++
 1 file changed, 2 insertions(+)
-------------- next part --------------
diff --git a/server/thread.c b/server/thread.c
index 55eb8513af8..071c91988b6 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -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
 


More information about the wine-devel mailing list