cpu_set_t is named cpuset_t on FreeBSD.
Add headers to allow for warning free compilation.
#ifdef HAVE_PTHREAD
#include <pthread.h>
+#ifdef HAVE_PTHREAD_SETAFFINITY_NP
+#if defined(__FreeBSD__)
+#include <pthread_np.h>
+#include <sys/param.h>
+#include <sys/cpuset.h>
+#endif
+#endif
#endif
#include <check.h>
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
static pa_atomic_t i_cpu = PA_ATOMIC_INIT(0);
+#ifdef __FreeBSD__
+ cpuset_t mask;
+#else
cpu_set_t mask;
+#endif
CPU_ZERO(&mask);
CPU_SET((size_t) (pa_atomic_inc(&i_cpu) % n_cpu), &mask);
#ifdef HAVE_PTHREAD
#include <pthread.h>
+#ifdef HAVE_PTHREAD_SETAFFINITY_NP
+#if defined(__FreeBSD__)
+#include <pthread_np.h>
+#include <sys/param.h>
+#include <sys/cpuset.h>
+#endif
+#endif
#endif
#include <pulse/util.h>
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
{
+#ifdef __FreeBSD__
+ cpuset_t mask;
+#else
cpu_set_t mask;
+#endif
CPU_ZERO(&mask);
CPU_SET((size_t) PA_PTR_TO_UINT(p), &mask);