#include <unistd.h>
#include <time.h>
#include <inttypes.h>
-#include <string.h>
#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);
pa_assert(msec_upper > 0);
pa_assert(msec_upper >= msec_lower);
- pa_log_notice("Creating random latencies in the range of %ims to %ims.", msec_lower, msec_upper);
+ pa_log_notice("Creating random latencies in the range of %ims to %ims.", msec_lower, msec_upper);
for (n = 1; n < pa_ncpus(); n++) {
pa_assert_se(pa_thread_new("rtstutter", work, PA_UINT_TO_PTR(n)));