Bug 75283 - Make pulseaudio compile on FreeBSD
Summary: Make pulseaudio compile on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) FreeBSD
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-20 22:32 UTC by Koop Mast
Modified: 2014-02-25 12:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[Patch 1/2] make the tests compile (1.64 KB, patch)
2014-02-20 22:33 UTC, Koop Mast
Details | Splinter Review
[Patch 2/2] Don't use 64-bit asm on 32-bit (3.32 KB, patch)
2014-02-20 22:34 UTC, Koop Mast
Details | Splinter Review
Make tests build on FreeBSD (1.71 KB, patch)
2014-02-23 00:04 UTC, Koop Mast
Details | Splinter Review

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.