$NetBSD: patch-aa,v 1.2 2009/06/08 07:25:20 hasso Exp $

--- softmixer.c.orig	2007-12-15 07:38:57.000000000 +0000
+++ softmixer.c
@@ -17,6 +17,10 @@
   #include "config.h"
 #endif
 
+#ifdef __NetBSD__
+#include <sys/param.h>
+#endif
+
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <string.h>
@@ -35,6 +39,12 @@
 #include "common.h"
 #include "log.h"
 
+#if defined(__NetBSD__) && __NetBSD_Version__ < 599001500
+#define OLD_GETLINE
+int     getline(FILE *, char *, size_t, const char **);
+#include "getline.c"
+#endif
+
 #define swap_32bit_endianess(i32) \
   ( ((i32&0x000000FF)<<24) | ((i32&0x0000FF00)<<8)| \
   ((i32&0x00FF0000)>>8) | ((i32&0xFF000000)>>24) ) 
@@ -147,7 +157,11 @@ void softmixer_read_config()
   int buffersize=-1, readbytes=-1;
   int tmp;
 
+#ifdef OLD_GETLINE
+  while((readbytes=getline(cf, linebuffer, (size_t)buffersize, (void *)NULL) > -1))
+#else
   while((readbytes=getline(&linebuffer, &buffersize, cf)>-1))
+#endif
   {
     if(
       strncasecmp
