1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$NetBSD: patch-aa,v 1.2 2009/06/08 07:25:20 hasso Exp $
--- softmixer.c.orig 2008-04-06 19:57:33.000000000 -0400
+++ softmixer.c
@@ -35,6 +35,12 @@
#include "common.h"
#include "log.h"
+#if !defined(getline) && !defined(__DragonFly__)
+#define NETBSD_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 +153,11 @@ void softmixer_read_config()
int buffersize=-1, readbytes=-1;
int tmp;
+#ifdef NETBSD_GETLINE
+ while((readbytes=getline(cf, linebuffer, (size_t)buffersize, (void *)NULL) > -1))
+#else
while((readbytes=getline(&linebuffer, &buffersize, cf)>-1))
+#endif
{
if(
strncasecmp
|