[vlc-commits] [Git][videolan/vlc][master] upnp: server: handle libupnp 1.18.0 API change in Upnp_FunPtr

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun May 10 18:08:24 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
cb761db2 by Olaf Hering at 2026-05-10T19:54:14+02:00
upnp: server: handle libupnp 1.18.0 API change in Upnp_FunPtr

The *event argument changed from "const void *" to "void *".

Co-authored-by: Abderhman Gamal <abderhmangamal246 at gmail.com>
Signed-off-by: Olaf Hering <olaf at aepfle.de>

- - - - -


2 changed files:

- modules/control/upnp_server/upnp_server.cpp
- modules/services_discovery/upnp-wrapper.hpp


Changes:

=====================================
modules/control/upnp_server/upnp_server.cpp
=====================================
@@ -272,7 +272,7 @@ static void handle_action_request(UpnpActionRequest *p_request, intf_thread_t *p
     }
 }
 
-static int Callback(Upnp_EventType event_type, const void *event, void *cookie)
+static int Callback(Upnp_EventType event_type, UpnpEventPtr event, void *cookie)
 {
     auto *intf = static_cast<intf_thread_t *>(cookie);
 


=====================================
modules/services_discovery/upnp-wrapper.hpp
=====================================
@@ -40,7 +40,11 @@
 #include <upnp.h>
 #include <upnptools.h>
 
+#if UPNP_VERSION_MAJOR == 17 || (UPNP_VERSION_MAJOR == 1 && (UPNP_VERSION < 11426 || (UPNP_VERSION > 11429 && UPNP_VERSION < 11800)))
 typedef const void* UpnpEventPtr;
+#else
+typedef void* UpnpEventPtr;
+#endif
 
 /**
  * libUpnp allows only one instance per process, so we create a wrapper



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cb761db2f6d10feec82af20f81392f9ced6008c8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cb761db2f6d10feec82af20f81392f9ced6008c8
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list