$NetBSD: patch-ae,v 1.4 2006/07/07 16:50:35 reinoud Exp $

--- lib/libiax2/src/iax.c.orig	2006-06-08 00:03:53.000000000 +0200
+++ lib/libiax2/src/iax.c
@@ -38,6 +38,7 @@ void gettimeofday(struct timeval *tv, vo
 
 #else
 
+#include <sys/types.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -62,7 +63,7 @@ void gettimeofday(struct timeval *tv, vo
 #if !defined(MACOSX) && !defined(__FreeBSD__)
 #include <malloc.h>
 #ifndef SOLARIS
-#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
 #include <error.h>
 #endif
 #endif
@@ -97,7 +98,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
