From 51af830d3014a99831482121e2c71408fc95a46e Mon Sep 17 00:00:00 2001 From: pastel Date: Mon, 1 Jul 2024 17:20:33 -0500 Subject: [PATCH] Fix miniupnpc version 18+ --- src/netcode/i_tcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 6a50f440b..24dfd7ec2 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -317,7 +317,11 @@ init_upnpc_once(struct upnpdata *upnpuserdata) I_OutputMsg(M_GetText("Found UPnP device:\n desc: %s\n st: %s\n"), dev->descURL, dev->st); +#if (MINIUPNPC_API_VERSION >= 18) + UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), NULL, 0); +#else UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); +#endif I_OutputMsg(M_GetText("Local LAN IP address: %s\n"), lanaddr); descXML = miniwget(dev->descURL, &descXMLsize, scope_id, &status_code); if (descXML)