summaryrefslogtreecommitdiff
path: root/src/output/plugins/SndioOutputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-01 19:53:23 +0100
committerMax Kellermann <max@musicpd.org>2017-02-01 19:53:23 +0100
commit38d263ac19013d6f5debbf2e6d0d74efd901977c (patch)
treeac7e9349d7f225d7fdf10b72b99e30140f352dea /src/output/plugins/SndioOutputPlugin.cxx
parentf71c204eef0149c25951597f5c4235cbfcac981c (diff)
output/sndio: work around a libroar C++ incompatibility
Same as in commit e02d8ad8d29ac, but this time for the sndio plugin which can be emulated by libroar.
Diffstat (limited to 'src/output/plugins/SndioOutputPlugin.cxx')
-rw-r--r--src/output/plugins/SndioOutputPlugin.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/output/plugins/SndioOutputPlugin.cxx b/src/output/plugins/SndioOutputPlugin.cxx
index c5f63dfd7..b0050d6ae 100644
--- a/src/output/plugins/SndioOutputPlugin.cxx
+++ b/src/output/plugins/SndioOutputPlugin.cxx
@@ -24,8 +24,16 @@
#include "util/Domain.hxx"
#include "Log.hxx"
+/* work around a C++ incompatibility if the sndio API is emulated by
+ libroar: libroar's "struct roar_service_stream" has a member named
+ "new", which is an illegal identifier in C++ */
+#define new new_
+
#include <sndio.h>
+/* undo the libroar workaround */
+#undef new
+
#include <stdexcept>
#ifndef SIO_DEVANY