]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
find endian.h on non-linux (bug #3846)
authorRussell Bryant <russell@russellbryant.com>
Sat, 2 Apr 2005 07:59:45 +0000 (07:59 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 2 Apr 2005 07:59:45 +0000 (07:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5358 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_oss.c

index f540a4b91996a85549e367884a144673014ce2ed..57f00665cb19ee5723bbb2a7889a3460663a0597 100755 (executable)
 #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__)