summaryrefslogtreecommitdiff
path: root/audio/sox/patches/patch-ab
blob: 558568b60bf824dae1299e9a2a439546695d5bcf (plain)
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
$NetBSD: patch-ab,v 1.6 2002/07/12 19:30:51 mycroft Exp $

--- sunaudio.c.orig	Sat Dec  1 02:17:18 2001
+++ sunaudio.c	Fri Jul 12 19:18:31 2002
@@ -31,7 +31,9 @@
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#ifndef __NetBSD__
 #include <stropts.h>
+#endif
 #include <malloc.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -170,7 +172,11 @@
         return(ST_EOF);
     }
     /* Flush any data in the buffers - its probably in the wrong format */
+#ifdef __NetBSD__
+    ioctl(fileno(ft->fp), AUDIO_FLUSH);
+#else
     ioctl(fileno(ft->fp), I_FLUSH, FLUSHR);
+#endif
     /* Change to non-buffered I/O*/
     setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * ft->file.size);
     sigintreg(ft);      /* Prepare to catch SIGINT */