Fix #defines for Debian GNU/kFreeBSD

Because debian does not run with the freebsd libc, but rather uses the
GNU one, it chose to not define __FreeBSD__, but rather __FreeBSD_kernel__.
Use the alternative when the functionality tested is for kernel
features, and keep the __FreeBSD__ one when using freebsd libc
headers.

If this patch is applied, debian could drop all the current patches when
importing 6.0 :)
This commit is contained in:
Felipe Sateler 2014-11-29 16:54:57 -03:00 committed by David Henningsson
parent 5cae5fc848
commit 13a3daa928
6 changed files with 19 additions and 15 deletions

View file

@ -33,7 +33,7 @@
#include "cpu-x86.h"
#include "sconv.h"
#if (!defined(__APPLE__) && !defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
#if (!defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && defined (__i386__)) || defined (__amd64__)
static const PA_DECLARE_ALIGNED (16, float, scale[4]) = { 0x8000, 0x8000, 0x8000, 0x8000 };
@ -163,7 +163,7 @@ static void pa_sconv_s16le_from_f32ne_sse2(unsigned n, const float *a, int16_t *
#endif /* defined (__i386__) || defined (__amd64__) */
void pa_convert_func_init_sse(pa_cpu_x86_flag_t flags) {
#if (!defined(__APPLE__) && !defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
#if (!defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && defined (__i386__)) || defined (__amd64__)
if (flags & PA_CPU_X86_SSE2) {
pa_log_info("Initialising SSE2 optimized conversions.");