From 818b7e0641f25f55c46bf654d8edb7911c10d584 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 Aug 2019 11:41:12 +0200 Subject: [PATCH] output/solaris: include sys/stropts.h only on Solaris This header had been available for a long time on Linux, but was removed in glibc 2.30. This commit moves the `#include` line inside the `#ifdef __sun` block and adds a fake declaration of `I_FLUSH` for the Linux build. Closes https://github.com/MusicPlayerDaemon/MPD/issues/630 --- src/output/plugins/SolarisOutputPlugin.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/output/plugins/SolarisOutputPlugin.cxx b/src/output/plugins/SolarisOutputPlugin.cxx index bb7cc56d6..d6323d5aa 100644 --- a/src/output/plugins/SolarisOutputPlugin.cxx +++ b/src/output/plugins/SolarisOutputPlugin.cxx @@ -22,7 +22,6 @@ #include "system/FileDescriptor.hxx" #include "system/Error.hxx" -#include #include #include #include @@ -31,11 +30,18 @@ #ifdef __sun #include +#include #else /* some fake declarations that allow build this plugin on systems other than Solaris, just to see if it compiles */ +#include + +#ifndef I_FLUSH +#define I_FLUSH 0 +#endif + #define AUDIO_GETINFO 0 #define AUDIO_SETINFO 0 #define AUDIO_ENCODING_LINEAR 0