$OpenBSD: patch-chan_unistim_c,v 1.2 2009/04/07 23:19:20 sthen Exp $
--- chan_unistim.c.orig	Tue Oct  7 16:52:37 2008
+++ chan_unistim.c	Wed Apr  8 00:16:02 2009
@@ -31,6 +31,8 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
 #include <net/if.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -74,7 +76,7 @@
 
 /* IP_PKTINFO is not portable. It's used to retrieve our IP.
    Comment the next line if your running *BSD */
-#define HAVE_PKTINFO 1
+/* #define HAVE_PKTINFO 1 */
 
 /* Beware, G729 and G723 are not supported by asterisk, except with the proper licence */
 #define CAPABILITY AST_FORMAT_ALAW | AST_FORMAT_ULAW    /* | AST_FORMAT_G729A | AST_FORMAT_G723_1 */
@@ -388,7 +390,7 @@ static struct unistim_device {
         char datetimeformat;            /* format used for displaying time/date */
         char contrast;                          /* contrast */
         char country[3];                        /* country used for dial tone frequency */
-        struct ind_tone_zone *tz;           /* Tone zone used by res_indications for ring, busy, congestion */
+        struct tone_zone *tz;           /* Tone zone used by res_indications for ring, busy, congestion */
         char ringvolume;                        /* Ring volume */
         char ringstyle;                         /* Ring melody */
         int rtp_port;                           /* RTP port used by the phone */
@@ -4042,10 +4044,10 @@ static char *control2str(int ind)
 }
 
 static void
-in_band_indication(struct ast_channel *ast, const struct ind_tone_zone *tz,
+in_band_indication(struct ast_channel *ast, const struct tone_zone *tz,
                                    const char *indication)
 {
-        const struct ind_tone_zone_sound *ts = NULL;
+        const struct tone_zone_sound *ts = NULL;
 
         ts = ast_get_indication_tone(tz, indication);
         if (ts && ts->data[0])
