Bug 75283

Summary: Make pulseaudio compile on FreeBSD
Product: PulseAudio Reporter: Koop Mast <kwm>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: x86 (IA32)   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: [Patch 1/2] make the tests compile
[Patch 2/2] Don't use 64-bit asm on 32-bit
Make tests build on FreeBSD

Description Koop Mast 2014-02-20 22:32:38 UTC
There are two problems when trying to build pulseaudio on FreeBSD.
The first one is that it uses cpu_set_t which is named cpuset_t on FreeBSD.
And the second one is that it tries to use 64-bit asm on 32-bit i386.
Comment 1 Koop Mast 2014-02-20 22:33:26 UTC
Created attachment 94459 [details] [review]
[Patch 1/2] make the tests compile
Comment 2 Koop Mast 2014-02-20 22:34:05 UTC
Created attachment 94460 [details] [review]
[Patch 2/2] Don't use 64-bit asm on 32-bit
Comment 3 Tanu Kaskinen 2014-02-22 11:08:12 UTC
Thanks for the patches! There's a problem with the first patch, it breaks compilation on Linux:

  CC       tests/once_test-once-test.o
tests/once-test.c:27:24: fatal error: pthread_np.h: No such file or directory

I applied the second patch with some changes (added parentheses to make it more obvious how the #if conditions with mixed && and || are evaluated, and modified the commit message a bit): http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=b0a04d8031f9efd983f76c379a2982cf7ee769f5
Comment 4 Koop Mast 2014-02-23 00:04:18 UTC
Created attachment 94590 [details] [review]
Make tests build on FreeBSD

Update patch after Tanu pointed out in #3 that the patch doesn't build on linux. The reason for this is that on linux, pthread_setaffinity_np() and friends live in phtread.h. Wrap the additional headers in a "if defined(__FreeBSD__)".

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.