From 50d35c9677227a21a97507cb43d0d74fc4e7f306 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 23 Apr 2022 11:42:26 -0700 Subject: [PATCH] upnp: use UpnpInit2 always libupnp 1.14 removes the non 2 function. Fixes compilation there. Signed-off-by: Rosen Penev Closes https://github.com/MusicPlayerDaemon/MPD/issues/1499 --- NEWS | 2 ++ src/lib/upnp/Init.cxx | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index f28c274f7..ced9d58ff 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/src/lib/upnp/Init.cxx b/src/lib/upnp/Init.cxx index bc3da2f51..3a0a19bf3 100644 --- a/src/lib/upnp/Init.cxx +++ b/src/lib/upnp/Init.cxx @@ -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));