summaryrefslogtreecommitdiff
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-03-24 22:01:56 +0000
committerMark Spencer <markster@digium.com>2005-03-24 22:01:56 +0000
commit78d9eee14173cfd9f2ffb2a448319563913773d3 (patch)
tree16775f99f6a68325c7ef6480fa4537d1ece9f000 /channels/chan_oss.c
parent1398781ee76ce28029f704258d99fa9ba5601046 (diff)
Fix OSS endian issues in OSS (bug #3846)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_oss.c')
-rwxr-xr-xchannels/chan_oss.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 316529c94..480408eb7 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -34,7 +34,24 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include <endian.h>
+
+#if defined( __OpenBSD__ )
+# include <sys/endian.h>
+#elif defined( __FreeBSD__ ) || defined( __NetBSD__ )
+# include <sys/endian.h>
+#elif defined( BSD ) && ( BSD >= 199103 ) || defined(__APPLE__)
+# include <machine/endian.h>
+#elif defined ( SOLARIS )
+# include <solaris-compat/compat.h>
+#elif defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
+# include <endian.h>
+#if !defined(__APPLE__)
+# include <byteswap.h>
+#endif
+#elif defined( linux )
+# include <endian.h>
+#endif
+
#ifdef __linux
#include <linux/soundcard.h>
#elif defined(__FreeBSD__)