mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-19 07:00:03 -05:00
Make tests compile on FreeBSD
cpu_set_t is named cpuset_t on FreeBSD. Add headers to allow for warning free compilation.
This commit is contained in:
parent
d94cd5f730
commit
b115e9c592
2 changed files with 22 additions and 0 deletions
|
|
@ -30,6 +30,13 @@
|
|||
|
||||
#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>
|
||||
|
|
@ -54,7 +61,11 @@ static void work(void *p) {
|
|||
|
||||
#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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue