mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-26 12:47:37 +00:00
Support for both MiniUPNPC 2.0 and MiniUPNPC < 2.0
MiniUPNPC 2.0 was a backwards-incompatible change (as .0s tend to be) but configure detects them the same. This adds support for the changed functions.
This commit is contained in:
parent
5cf668c302
commit
ef65f6c57a
@ -50,7 +50,11 @@ void natt_init(void)
|
||||
int upnperror = 0;
|
||||
memset(&urls, 0, sizeof(struct UPNPUrls));
|
||||
memset(&data, 0, sizeof(struct IGDdatas));
|
||||
#if MINIUPNPC_API_VERSION < 16
|
||||
devlist = upnpDiscover(2000, NULL, NULL, 0, 0, &upnperror);
|
||||
#else
|
||||
devlist = upnpDiscover(2000, NULL, NULL, 0, 0, 2, &upnperror);
|
||||
#endif
|
||||
if (devlist)
|
||||
{
|
||||
dev = devlist;
|
||||
@ -63,7 +67,11 @@ void natt_init(void)
|
||||
if (!dev)
|
||||
dev = devlist;
|
||||
|
||||
#if MINIUPNPC_API_VERSION < 16
|
||||
descXML = (char *) miniwget(dev->descURL, &descXMLsize, 0);
|
||||
#else
|
||||
descXML = (char *) miniwget(dev->descURL, &descXMLsize, 0, NULL);
|
||||
#endif
|
||||
if (descXML)
|
||||
{
|
||||
parserootdesc (descXML, descXMLsize, &data);
|
||||
|
Loading…
Reference in New Issue
Block a user