$NetBSD: patch-ae,v 1.5 2007/08/05 18:37:01 joerg Exp $

--- lib/libiax2/src/iax.c.orig	2006-06-07 22:03:53.000000000 +0000
+++ lib/libiax2/src/iax.c
@@ -18,7 +18,6 @@
 #include <winsock.h>
 #include <time.h>
 #include <stdlib.h>
-#include <malloc.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -38,6 +37,7 @@ void gettimeofday(struct timeval *tv, vo
 
 #else
 
+#include <sys/types.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -59,15 +59,6 @@ void gettimeofday(struct timeval *tv, vo
 #include <arpa/inet.h>
 #include <time.h>
 
-#if !defined(MACOSX) && !defined(__FreeBSD__)
-#include <malloc.h>
-#ifndef SOLARIS
-#if !defined(__NetBSD__) && !defined(__FreeBSD__)
-#include <error.h>
-#endif
-#endif
-#endif
- 
  #endif
 
 #ifdef NEWJB
@@ -97,7 +88,7 @@ void gettimeofday(struct timeval *tv, vo
 #ifdef SOLARIS
 #define IAX_SOCKOPTS MSG_DONTWAIT
 #else
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 #define IAX_SOCKOPTS MSG_DONTWAIT
 #else  /* Linux and others */
 #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
