move pthread_setaffinity_np check to the build system
Rather than trying to encode all of the rules in a header, lets just put
them in the build system where they belong. This fixes the build on
FreeBSD, which does have pthraed_setaffinity_np, but it's in a
pthread_np.h, not behind _GNU_SOURCE. FreeBSD also implements cpu_set
slightly differently, so additional changes would be required to get it
working right there anyway.
v2: - fix #define in autotools
Fixes: 9f1bbbdbbd
("util: try to fix the Android and MacOS build")
Cc: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
@@ -36,10 +36,6 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PTHREAD) && !defined(ANDROID) && !defined(__APPLE__)
|
||||
#define HAVE_PTHREAD_SETAFFINITY
|
||||
#endif
|
||||
|
||||
static inline thrd_t u_thread_create(int (*routine)(void *), void *param)
|
||||
{
|
||||
thrd_t thread;
|
||||
|
Reference in New Issue
Block a user