summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Welche <prlw1@cam.ac.uk>2014-02-23 11:12:48 +0000
committerTakashi Iwai <tiwai@suse.de>2014-02-24 11:00:53 +0100
commit7a6e8ca348c4c2640cbc337914d1376333fdbc17 (patch)
tree2a20beec4d88eda93088fd53bde593505d9d0f7a /include
parent1af088e39b75a0a0897c7036487b143e983cd423 (diff)
Portability fix: look for sys/endian.h as well as endian.h
- define __BYTE_ORDER and friends. - adjust asoundlib.h accordingly. Signed-off-by: Patrick Welche <prlw1@cam.ac.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/asoundlib-head.h13
-rw-r--r--include/local.h18
2 files changed, 17 insertions, 14 deletions
diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
index 71b5c29f..1ec611e5 100644
--- a/include/asoundlib-head.h
+++ b/include/asoundlib-head.h
@@ -35,19 +35,6 @@
#include <string.h>
#include <fcntl.h>
#include <assert.h>
-#include <endian.h>
#include <sys/poll.h>
#include <errno.h>
#include <stdarg.h>
-
-#ifndef __GNUC__
-#define __inline__ inline
-#endif
-
-#include <alsa/asoundef.h>
-#include <alsa/version.h>
-#include <alsa/global.h>
-#include <alsa/input.h>
-#include <alsa/output.h>
-#include <alsa/error.h>
-#include <alsa/conf.h>
diff --git a/include/local.h b/include/local.h
index 9464efa4..2fe9a273 100644
--- a/include/local.h
+++ b/include/local.h
@@ -22,13 +22,30 @@
#ifndef __LOCAL_H
#define __LOCAL_H
+#include "config.h"
+
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <assert.h>
+#ifdef HAVE_ENDIAN_H
#include <endian.h>
+#elif defined(HAVE_SYS_ENDIAN_H)
+#include <sys/endian.h>
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER BYTE_ORDER
+#endif
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+#endif
+#else
+#error Header defining endianness not defined
+#endif
#include <stdarg.h>
#include <sys/poll.h>
#include <sys/types.h>
@@ -36,7 +53,6 @@
#include <linux/types.h>
#include <linux/ioctl.h>
-#include "config.h"
#ifdef SUPPORT_RESMGR
#include <resmgr.h>
#endif