mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
add NetBSD/OpenBSD build support (except test/)
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
e288ca7c29
commit
b33ef3f73d
14 changed files with 52 additions and 17 deletions
|
|
@ -27,6 +27,11 @@
|
|||
#define bswap_16 bswap16
|
||||
#define bswap_32 bswap32
|
||||
#define bswap_64 bswap64
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 swap16
|
||||
#define bswap_32 swap32
|
||||
#define bswap_64 swap64
|
||||
#elif defined (__sun)
|
||||
#include <sys/byteorder.h>
|
||||
#define bswap_16 BSWAP_16
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#include <endian.h>
|
||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
#include <sys/endian.h>
|
||||
#else
|
||||
#error Header defining endianness not defined
|
||||
#endif
|
||||
#ifndef __BYTE_ORDER
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
|
|
@ -43,9 +46,6 @@
|
|||
#ifndef __BIG_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
#else
|
||||
#error Header defining endianness not defined
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <poll.h>
|
||||
#include <sys/types.h>
|
||||
|
|
@ -85,6 +85,8 @@
|
|||
#define versionsort64 versionsort
|
||||
#define alphasort64 alphasort
|
||||
#define ino64_t ino_t
|
||||
#define fstat64 fstat
|
||||
#define stat64 stat
|
||||
#endif
|
||||
|
||||
#define _snd_config_iterator list_head
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#ifndef DOC_HIDDEN
|
||||
#include <stdint.h>
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__)
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
typedef uint8_t __u8;
|
||||
|
|
@ -15,8 +15,14 @@ typedef int16_t __s16;
|
|||
typedef int32_t __s32;
|
||||
typedef int64_t __s64;
|
||||
|
||||
#if defined(__sun)
|
||||
#include <sys/byteorder.h>
|
||||
#define __cpu_to_le32 LE_32(x)
|
||||
#define __cpu_to_be32 BE_32(x)
|
||||
#define __cpu_to_le16 LE_16(x)
|
||||
#define __cpu_to_be16 BE_16(x)
|
||||
#else
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define __cpu_to_le32(x) (x)
|
||||
#define __cpu_to_be32(x) bswap_32(x)
|
||||
|
|
@ -28,20 +34,12 @@ typedef int64_t __s64;
|
|||
#define __cpu_to_le16(x) bswap_16(x)
|
||||
#define __cpu_to_be16(x) (x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __le32_to_cpu __cpu_to_le32
|
||||
#define __be32_to_cpu __cpu_to_be32
|
||||
#define __le16_to_cpu __cpu_to_le16
|
||||
#define __be16_to_cpu __cpu_to_be16
|
||||
|
||||
#define __le64 __u64
|
||||
#define __le32 __u32
|
||||
#define __le16 __u16
|
||||
#define __le8 __u8
|
||||
#define __be64 __u64
|
||||
#define __be32 __u32
|
||||
#define __be16 __u16
|
||||
#define __be8 __u8
|
||||
#endif
|
||||
|
||||
#ifndef __kernel_long_t
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
#ifndef __LINUX_UAPI_SND_ASOC_H
|
||||
#define __LINUX_UAPI_SND_ASOC_H
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum number of channels topology kcontrol can represent.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue