Include fixes for portability
authorMark Spencer <markster@digium.com>
Fri, 16 May 2003 23:33:41 +0000 (23:33 +0000)
committerMark Spencer <markster@digium.com>
Fri, 16 May 2003 23:33:41 +0000 (23:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

chanvars.c
enum.c
include/asterisk/frame.h

index 6f8e847..4c67ca8 100755 (executable)
@@ -11,7 +11,7 @@
  * the GNU General Public License
  */
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <asterisk/chanvars.h>
diff --git a/enum.c b/enum.c
index 0c60547..b422782 100755 (executable)
--- a/enum.c
+++ b/enum.c
 #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 99a9296..b0ea7ef 100755 (executable)
@@ -26,6 +26,11 @@ extern "C" {
 #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