[Asterisk-Dev] More include fixes

Thorsten Lockert tholo at sigmasoft.com
Wed Apr 23 12:58:48 MST 2003


This diff makes Asterisk find include files in common places
on more systems

Index: apps/app_intercom.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_intercom.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 app_intercom.c
--- apps/app_intercom.c	16 Mar 2003 22:37:29 -0000	1.1.1.2
+++ apps/app_intercom.c	23 Apr 2003 19:54:49 -0000
@@ -26,7 +26,11 @@
 #include <stdlib.h>
 #include <pthread.h>
 #include <sys/time.h>
+#ifdef __linux__
 #include <linux/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
 #include <netinet/in.h>
 
 #define DEV_DSP "/dev/dsp"
Index: channels/chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.2
diff -u -r1.2 chan_oss.c
--- channels/chan_oss.c	12 Apr 2003 14:03:09 -0000	1.2
+++ channels/chan_oss.c	23 Apr 2003 19:55:04 -0000
@@ -33,7 +33,11 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
+#ifdef __linux
 #include <linux/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
 #include "busy.h"
 #include "ringtone.h"
 #include "ring10.h"
Index: formats/format_g729.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_g729.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_g729.c
--- formats/format_g729.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_g729.c	23 Apr 2003 19:55:16 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 /* Some Ideas for this code came from makeg729e.c by Jeffery Chilton */
 
Index: formats/format_gsm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_gsm.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_gsm.c
--- formats/format_gsm.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_gsm.c	23 Apr 2003 19:55:17 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 /* Some Ideas for this code came from makegsme.c by Jeffery Chilton */
 
Index: formats/format_jpeg.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_jpeg.c,v
retrieving revision 1.2
diff -u -r1.2 format_jpeg.c
--- formats/format_jpeg.c	23 Apr 2003 19:09:13 -0000	1.2
+++ formats/format_jpeg.c	23 Apr 2003 19:55:17 -0000
@@ -26,8 +26,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
-
+#else
+#include <machine/endian.h>
+#endif
 
 
 static char *desc = "JPEG (Joint Picture Experts Group) Image Format";
Index: formats/format_pcm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_pcm.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_pcm.c
--- formats/format_pcm.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_pcm.c	23 Apr 2003 19:55:17 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 #define BUF_SIZE 160		/* 160 samples */
 
Index: formats/format_pcm_alaw.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_pcm_alaw.c,v
retrieving revision 1.2
diff -u -r1.2 format_pcm_alaw.c
--- formats/format_pcm_alaw.c	30 Mar 2003 22:55:42 -0000	1.2
+++ formats/format_pcm_alaw.c	23 Apr 2003 19:55:19 -0000
@@ -27,7 +27,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 #define BUF_SIZE 160		/* 160 samples */
 
Index: formats/format_vox.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_vox.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_vox.c
--- formats/format_vox.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_vox.c	23 Apr 2003 19:55:19 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 #define BUF_SIZE 80		/* 160 samples */
 
Index: formats/format_wav.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_wav.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_wav.c
--- formats/format_wav.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_wav.c	23 Apr 2003 19:55:19 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 
 /* Some Ideas for this code came from makewave.c by Jeffery Chilton */
 
Index: formats/format_wav_gsm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_wav_gsm.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 format_wav_gsm.c
--- formats/format_wav_gsm.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ formats/format_wav_gsm.c	23 Apr 2003 19:55:19 -0000
@@ -25,7 +25,11 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 #include "msgsm.h"
 
 /* Some Ideas for this code came from makewave.c by Jeffery Chilton */
Index: include/asterisk/frame.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/frame.h,v
retrieving revision 1.3
diff -u -r1.3 frame.h
--- include/asterisk/frame.h	15 Apr 2003 04:36:52 -0000	1.3
+++ include/asterisk/frame.h	23 Apr 2003 19:55:19 -0000
@@ -20,7 +20,11 @@
 extern "C" {
 #endif
 
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
 #include <sys/types.h>
 
 //! Data structure associated with a single frame of data
--
Thorsten Lockert      | tholo at sigmasoft.com | Universe, n.:
2121 N. Lakeshore Dr. | tholo at openbsd.org   |         The problem.
Chapel Hill, NC 27514 |                     |



More information about the asterisk-dev mailing list