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

@ -180,7 +180,7 @@ static inline bool pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void*
return r == old_p;
}
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/cdefs.h>
#include <sys/types.h>