diff options
author | SASANO Takayoshi <uaa@uaa.org.uk> | 2022-07-12 20:37:44 +0900 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2022-10-17 13:11:34 +0200 |
commit | f89245ee662cda4c56c0422dc634cc1a07188b05 (patch) | |
tree | 18227e09be96f3f621afbd8ccb21d19fffc2edb4 | |
parent | b33ef3f73d632f54c27138e585030c50d76f47aa (diff) | |
download | alsa-lib-f89245ee662cda4c56c0422dc634cc1a07188b05.tar.gz |
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>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | include/sound/type_compat.h | 2 | ||||
-rw-r--r-- | include/sound/uapi/asound.h | 2 | ||||
-rw-r--r-- | src/ucm/ucm_exec.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 9a9eda9b..8256c032 100644 --- a/configure.ac +++ b/configure.ac @@ -764,8 +764,9 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ dnl Create asoundlib.h dynamically according to configure options echo "Creating 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 -if test "$ac_cv_header_sys_endian_h" = "yes"; then +else cat >> include/asoundlib.h <<EOF #include <sys/endian.h> #ifndef __BYTE_ORDER diff --git a/include/sound/type_compat.h b/include/sound/type_compat.h index 0c424efc..c670245c 100644 --- a/include/sound/type_compat.h +++ b/include/sound/type_compat.h @@ -22,7 +22,7 @@ typedef int64_t __s64; #define __cpu_to_le16 LE_16(x) #define __cpu_to_be16 BE_16(x) #else -#include <endian.h> +#include <sys/endian.h> #if __BYTE_ORDER == __LITTLE_ENDIAN #define __cpu_to_le32(x) (x) #define __cpu_to_be32(x) bswap_32(x) diff --git a/include/sound/uapi/asound.h b/include/sound/uapi/asound.h index c3f65e13..fc18c024 100644 --- a/include/sound/uapi/asound.h +++ b/include/sound/uapi/asound.h @@ -28,7 +28,7 @@ #include <linux/types.h> #include <asm/byteorder.h> #else -#include <endian.h> +#include <sys/endian.h> #include <sys/ioctl.h> #endif diff --git a/src/ucm/ucm_exec.c b/src/ucm/ucm_exec.c index d5251fab..500a3b13 100644 --- a/src/ucm/ucm_exec.c +++ b/src/ucm/ucm_exec.c @@ -33,7 +33,7 @@ #include <limits.h> #include <dirent.h> -#if defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) #include <signal.h> extern char **environ; #endif |