Commit 7a68b1e7 authored by Thomas Klausner's avatar Thomas Klausner Committed by Max Kellermann

Adapt SolarisOutputPlugin.cxx to be usable on NetBSD.

parent d5468dfe
ver 0.21.21 (not yet released) ver 0.21.21 (not yet released)
* decoder * decoder
- gme: ignore empty tags - gme: ignore empty tags
* output
- solaris: port to NetBSD
ver 0.21.20 (2020/02/16) ver 0.21.20 (2020/02/16)
* decoder * decoder
......
...@@ -22,22 +22,23 @@ ...@@ -22,22 +22,23 @@
#include "system/FileDescriptor.hxx" #include "system/FileDescriptor.hxx"
#include "system/Error.hxx" #include "system/Error.hxx"
#include <sys/ioctl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#ifdef __sun #if defined(__sun)
#include <sys/audio.h> #include <sys/audio.h>
#include <sys/stropts.h> #include <sys/stropts.h>
#elif defined(__NetBSD__)
#include <sys/audioio.h>
#else #else
/* some fake declarations that allow build this plugin on systems /* some fake declarations that allow build this plugin on systems
other than Solaris, just to see if it compiles */ other than Solaris, just to see if it compiles */
#include <sys/ioctl.h>
#ifndef I_FLUSH #ifndef I_FLUSH
#define I_FLUSH 0 #define I_FLUSH 0
#endif #endif
...@@ -147,7 +148,11 @@ SolarisOutput::Play(const void *chunk, size_t size) ...@@ -147,7 +148,11 @@ SolarisOutput::Play(const void *chunk, size_t size)
void void
SolarisOutput::Cancel() noexcept SolarisOutput::Cancel() noexcept
{ {
#if defined(AUDIO_FLUSH)
ioctl(fd.Get(), AUDIO_FLUSH);
#elif defined(I_FLUSH)
ioctl(fd.Get(), I_FLUSH); ioctl(fd.Get(), I_FLUSH);
#endif
} }
const struct AudioOutputPlugin solaris_output_plugin = { const struct AudioOutputPlugin solaris_output_plugin = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment