mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
add FreeBSD build support (except test/)
Note: NetBSD and OpenBSD has both <endian.h> and <sys/endian.h> Fixes: https://github.com/alsa-project/alsa-lib/pull/250 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
b33ef3f73d
commit
f89245ee66
4 changed files with 5 additions and 4 deletions
|
|
@ -764,8 +764,9 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||||
dnl Create asoundlib.h dynamically according to configure options
|
dnl Create asoundlib.h dynamically according to configure options
|
||||||
echo "Creating asoundlib.h..."
|
echo "Creating asoundlib.h..."
|
||||||
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
|
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
|
||||||
|
if test "$ac_cv_header_sys_endian_h" != "yes"; then
|
||||||
test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
|
test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
|
||||||
if test "$ac_cv_header_sys_endian_h" = "yes"; then
|
else
|
||||||
cat >> include/asoundlib.h <<EOF
|
cat >> include/asoundlib.h <<EOF
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#ifndef __BYTE_ORDER
|
#ifndef __BYTE_ORDER
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ typedef int64_t __s64;
|
||||||
#define __cpu_to_le16 LE_16(x)
|
#define __cpu_to_le16 LE_16(x)
|
||||||
#define __cpu_to_be16 BE_16(x)
|
#define __cpu_to_be16 BE_16(x)
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <sys/endian.h>
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
#define __cpu_to_le32(x) (x)
|
#define __cpu_to_le32(x) (x)
|
||||||
#define __cpu_to_be32(x) bswap_32(x)
|
#define __cpu_to_be32(x) bswap_32(x)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <sys/endian.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue