From dead4615427c675dac48dabdb9672aaa602f17b8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 31 Jan 2018 18:15:46 +0100 Subject: [PATCH] lib/upnp/Init: enable IPv6 --- NEWS | 1 + src/lib/upnp/Init.cxx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index ad631c9e1..28b372ed2 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.20.16 (not yet released) - pulse: fix crash during auto-detection * database - simple: fix search within mount points + - upnp: enable IPv6 * fix crash in debug build on Haiku and other operating systems ver 0.20.15 (2018/01/05) diff --git a/src/lib/upnp/Init.cxx b/src/lib/upnp/Init.cxx index 321ff7196..508425473 100644 --- a/src/lib/upnp/Init.cxx +++ b/src/lib/upnp/Init.cxx @@ -34,7 +34,11 @@ static unsigned upnp_ref; static void DoInit() { +#ifdef UPNP_ENABLE_IPV6 + auto code = UpnpInit2(nullptr, 0); +#else auto code = UpnpInit(nullptr, 0); +#endif if (code != UPNP_E_SUCCESS) throw FormatRuntimeError("UpnpInit() failed: %s", UpnpGetErrorMessage(code));