Package: 0ad
Version: 0.0.16-2
Severity: important
Tags: patch

Dear package maintainer,

We would like to have a transition to the last version of libminiupnpc10
which I uploaded to experimental. Unfortunately, 0ad FTBFS when building
with that new version.

I've attached to this bug report a patch for 0ad, which you can simply
drop in debian/patches. Please upload a new version of 0ad including this
patch ASAP, so we can start the miniupnpc transition.

Note that I have tested the patch, and 0ad built fine with it. However,
I didn't check/test for the UPnP functionality.

Cheers,

Thomas Goirand (zigo)
Description: Allow build with miniUPnPc > 9
 UPNP_GetSpecificPortMappingEntry() API changed, this patch makes it possible
 to support both old and new versions.
Author: Thomas Goirand <z...@debian.org>
Forwarded: no
Last-Update: 2014-06-11

--- 0ad-0.0.16.orig/source/network/NetServer.cpp
+++ 0ad-0.0.16/source/network/NetServer.cpp
@@ -272,11 +272,19 @@ void* CNetServerWorker::SetupUPnP(void*)
 	}
 
 	// Check that the port was actually forwarded.
+#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION > 9
+	ret = UPNP_GetSpecificPortMappingEntry(urls.controlURL,
+									 data.first.servicetype,
+									 psPort, protocall,
+									 intClient, intPort, NULL/*desc*/,
+									 NULL/*enabled*/, duration, NULL);
+#else
 	ret = UPNP_GetSpecificPortMappingEntry(urls.controlURL,
 									 data.first.servicetype,
 									 psPort, protocall,
 									 intClient, intPort, NULL/*desc*/,
 									 NULL/*enabled*/, duration);
+#endif
 
 	if (ret != UPNPCOMMAND_SUCCESS)
 	{

Reply via email to