summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch')
-rw-r--r--games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch
new file mode 100644
index 00000000000..716a07fe628
--- /dev/null
+++ b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch
@@ -0,0 +1,28 @@
+Index: common/i_net.cpp
+===================================================================
+--- common/i_net.cpp (revision 5459)
++++ common/i_net.cpp (working copy)
+@@ -151,7 +151,11 @@
+
+ Printf(PRINT_HIGH, "UPnP: Discovering router (max 1 unit supported)\n");
+
++#if MINIUPNPC_API_VERSION < 14
+ devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, &res);
++#else
++ devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, 2, &res);
++#endif
+
+ if (!devlist || res != UPNPDISCOVER_SUCCESS)
+ {
+@@ -179,7 +183,11 @@
+ // " desc: %s\n st: %s\n",
+ // dev->descURL, dev->st);
+
++#if MINIUPNPC_API_VERSION < 16
+ descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0);
++#else
++ descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0, &res);
++#endif
+
+ if (descXML)
+ {