[Asterisk-cvs] asterisk/channels chan_oss.c,1.44,1.45

markster at lists.digium.com markster at lists.digium.com
Thu Mar 24 16:07:36 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31860/channels

Modified Files:
	chan_oss.c 
Log Message:
Fix OSS endian issues in OSS (bug #3846)


Index: chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- chan_oss.c	24 Mar 2005 00:55:40 -0000	1.44
+++ chan_oss.c	24 Mar 2005 22:01:56 -0000	1.45
@@ -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__)




More information about the svn-commits mailing list