From 38d263ac19013d6f5debbf2e6d0d74efd901977c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Feb 2017 19:53:23 +0100 Subject: [PATCH] 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. --- NEWS | 2 ++ src/output/plugins/SndioOutputPlugin.cxx | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index fb9111ead..01c190ac9 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.4 (not yet released) +* output + - sndio: work around a libroar C++ incompatibility * workaround for GCC 4.9 "constexpr" bug * fix FreeBSD build failure 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 +/* undo the libroar workaround */ +#undef new + #include #ifndef SIO_DEVANY