output/sndio: work around a libroar C++ incompatibility

Same as in commit e02d8ad8d2, but this time for the sndio plugin
which can be emulated by libroar.
This commit is contained in:
Max Kellermann 2017-02-01 19:53:23 +01:00
parent f71c204eef
commit 38d263ac19
2 changed files with 10 additions and 0 deletions

2
NEWS
View File

@ -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

View File

@ -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