ref: ea39f13f0fd8b22979e200f1ba421a52ac087952
parent: 26ce8f25ca0a054ce14a4676e8f731603fdb0508
author: cbagwell <cbagwell>
date: Wed Mar 26 21:51:20 EST 2003
NetBSD patches
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,11 @@
This file contains a list of all changes starting after the release of
sox-11gamma.
+sox-12.17.5
+-----------
+ o Thomas Klausner sent in patches to compile audio drivers under
+ NetBSD.
+
sox-12.17.4
-----------
o Peter Nyhlen fixed a problem with reading Comments in Ogg Vorbis files.
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -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 */