diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 662e598e8..3e4976e0d 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -2985,7 +2985,12 @@ namespace nodetool UPNPUrls urls; IGDdatas igdData; char lanAddress[64]; +#if MINIUPNPC_API_VERSION < 18 result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); +#else + char wanAddress[64]; + result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); +#endif freeUPNPDevlist(deviceList); if (result > 0) { if (result == 1) { @@ -3053,7 +3058,12 @@ namespace nodetool UPNPUrls urls; IGDdatas igdData; char lanAddress[64]; +#if MINIUPNPC_API_VERSION < 18 result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); +#else + char wanAddress[64]; + result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); +#endif freeUPNPDevlist(deviceList); if (result > 0) { if (result == 1) {