--- libretroshare/src/upnp/upnphandler_miniupnp.cc 2018-03-14 03:25:38.000000000 +0800 +++ libretroshare/src/upnp/upnphandler_miniupnp.cc 2024-08-01 03:43:04.000000000 +0800 @@ -20,6 +20,9 @@ struct UPNPUrls urls; struct IGDdatas data; char lanaddr[16]; /* my ip address on the LAN */ +#if MINIUPNPC_API_VERSION >= 18 + char wanaddr[16]; /* my ip address on the WAN */ +#endif }; #include @@ -118,7 +121,11 @@ putchar('\n'); if(UPNP_GetValidIGD(upcd->devlist, &(upcd->urls), &(upcd->data), upcd->lanaddr, - sizeof(upcd->lanaddr))) + sizeof(upcd->lanaddr) +#if MINIUPNPC_API_VERSION >= 18 + , upcd->wanaddr, sizeof(upcd->wanaddr) +#endif + )) { printf("Found valid IGD : %s\n", upcd->urls.controlURL);