diff --git a/NEWS b/NEWS index 8a8dd0c92..07af565e0 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ ver 0.22 (not yet released) - io_uring: new plugin for local files on Linux (using liburing) * archive - iso9660: support seeking +* database + - upnp: drop support for libupnp versions older than 1.8 * playlist - cue: integrate contents in database * decoder diff --git a/src/lib/upnp/ClientInit.cxx b/src/lib/upnp/ClientInit.cxx index ae001e6e8..8b990c59c 100644 --- a/src/lib/upnp/ClientInit.cxx +++ b/src/lib/upnp/ClientInit.cxx @@ -33,10 +33,7 @@ static UpnpClient_Handle upnp_client_handle; static int UpnpClientCallback(Upnp_EventType et, -#if UPNP_VERSION >= 10800 - const -#endif - void *evp, + const void *evp, void *cookie) noexcept { if (cookie == nullptr) diff --git a/src/lib/upnp/Compat.hxx b/src/lib/upnp/Compat.hxx index e72d858d1..efe8c8e9c 100644 --- a/src/lib/upnp/Compat.hxx +++ b/src/lib/upnp/Compat.hxx @@ -22,51 +22,4 @@ #include -#if UPNP_VERSION < 10800 -/* emulate the libupnp 1.8 API with older versions */ - -using UpnpDiscovery = Upnp_Discovery; - -#endif - -#if UPNP_VERSION < 10624 -#include "util/Compiler.h" - -gcc_pure -static inline int -UpnpDiscovery_get_Expires(const UpnpDiscovery *disco) noexcept -{ - return disco->Expires; -} - -gcc_pure -static inline const char * -UpnpDiscovery_get_DeviceID_cstr(const UpnpDiscovery *disco) noexcept -{ - return disco->DeviceId; -} - -gcc_pure -static inline const char * -UpnpDiscovery_get_DeviceType_cstr(const UpnpDiscovery *disco) noexcept -{ - return disco->DeviceType; -} - -gcc_pure -static inline const char * -UpnpDiscovery_get_ServiceType_cstr(const UpnpDiscovery *disco) noexcept -{ - return disco->ServiceType; -} - -gcc_pure -static inline const char * -UpnpDiscovery_get_Location_cstr(const UpnpDiscovery *disco) noexcept -{ - return disco->Location; -} - -#endif - #endif diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx index f284916ee..c0f10b7ec 100644 --- a/src/lib/upnp/Discovery.hxx +++ b/src/lib/upnp/Discovery.hxx @@ -38,10 +38,6 @@ #include #include -#if UPNP_VERSION < 10800 -#define UpnpDiscovery Upnp_Discovery -#endif - class ContentDirectoryService; class UPnPDiscoveryListener { diff --git a/src/lib/upnp/meson.build b/src/lib/upnp/meson.build index 9e16f7319..f7570eb1c 100644 --- a/src/lib/upnp/meson.build +++ b/src/lib/upnp/meson.build @@ -1,4 +1,4 @@ -upnp_dep = dependency('libupnp', required: get_option('upnp')) +upnp_dep = dependency('libupnp', version: '>= 1.8', required: get_option('upnp')) conf.set('ENABLE_UPNP', upnp_dep.found()) if not upnp_dep.found() subdir_done()