upnp: use UpnpInit2 always

libupnp 1.14 removes the non 2 function. Fixes compilation there.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1499
This commit is contained in:
Rosen Penev 2022-04-23 11:42:26 -07:00 committed by Max Kellermann
parent 4260e78861
commit 50d35c9677
2 changed files with 2 additions and 4 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.23.7 (not yet released)
* database
- upnp: support pupnp 1.14
* decoder
- opus: fix missing song length on high-latency files
* output

View File

@ -36,11 +36,7 @@ static void
DoInit(const char* iface)
{
#ifdef UPNP_ENABLE_IPV6
auto code = UpnpInit2(iface, 0);
#else
auto code = UpnpInit(iface, 0);
#endif
if (code != UPNP_E_SUCCESS)
throw FormatRuntimeError("UpnpInit() failed: %s",
UpnpGetErrorMessage(code));