move pthread_setaffinity_np check to the build system
authorDylan Baker <dylan@pnwbakers.com>
Thu, 13 Sep 2018 18:06:09 +0000 (11:06 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Mon, 17 Sep 2018 20:16:46 +0000 (13:16 -0700)
commit3acc18fcf7c38e7060e43e2de59f09392aa8fdea
treef2766ca27c17e1b48bf9a3bc479be6f82947c1b2
parent60d0c0d062b543b85a354e5266aa974fcdc36290
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: 9f1bbbdbbd77d346c74c7abbb31f399151a85713
       ("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>
configure.ac
meson.build
src/util/u_thread.h