mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Enable builds with miniupnpc API 18
Backports https://github.com/godotengine/godot/pull/97139 without
bumping the embedded miniupnpc library.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit a2a46009f5)
This commit is contained in:
parent
862d8707f5
commit
b18d22f276
1 changed files with 4 additions and 0 deletions
|
|
@ -145,7 +145,11 @@ void UPNP::parse_igd(Ref<UPNPDevice> dev, UPNPDev *devlist) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char addr[16];
|
char addr[16];
|
||||||
|
#if MINIUPNPC_API_VERSION >= 18
|
||||||
|
int i = UPNP_GetValidIGD(devlist, urls, &data, (char *)&addr, 16, nullptr, 0);
|
||||||
|
#else
|
||||||
int i = UPNP_GetValidIGD(devlist, urls, &data, (char *)&addr, 16);
|
int i = UPNP_GetValidIGD(devlist, urls, &data, (char *)&addr, 16);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (i != 1) {
|
if (i != 1) {
|
||||||
FreeUPNPUrls(urls);
|
FreeUPNPUrls(urls);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue