[Asterisk-Dev] More include fixes

Thorsten Lockert tholo at sigmasoft.com
Fri May 16 08:24:28 MST 2003


Some of the latest changes broke includes on many non-Linux systems.
The attached diff corrects this.

Index: chanvars.c
===================================================================
RCS file: /usr/cvsroot/asterisk/chanvars.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 chanvars.c
--- chanvars.c	12 Feb 2003 13:59:13 -0000	1.1.1.1
+++ chanvars.c	16 May 2003 15:31:16 -0000
@@ -11,7 +11,7 @@
  * the GNU General Public License
  */
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <asterisk/chanvars.h>
Index: enum.c
===================================================================
RCS file: /usr/cvsroot/asterisk/enum.c,v
retrieving revision 1.3
diff -u -r1.3 enum.c
--- enum.c	1 May 2003 14:26:17 -0000	1.3
+++ enum.c	16 May 2003 15:31:16 -0000
@@ -15,6 +15,10 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
 #include <resolv.h>
 #include <errno.h>
 
Index: include/asterisk/frame.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/frame.h,v
retrieving revision 1.6
diff -u -r1.6 frame.h
--- include/asterisk/frame.h	12 May 2003 19:25:20 -0000	1.6
+++ include/asterisk/frame.h	16 May 2003 15:31:47 -0000
@@ -26,6 +26,11 @@
 #ifndef __BYTE_ORDER
 #ifdef __linux__
 #include <endian.h>
+#elif defined(__OpenBSD__)
+#include <machine/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
 #else
 #ifdef __LITTLE_ENDIAN__
 #define __BYTE_ORDER __LITTLE_ENDIAN
--
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