Merge bitcoin/bitcoin#30319: [26.x] upnp: fix build with miniupnpc 2.2.8

10413ac46c doc: add 30283 cherry-pick to rel notes (fanquake)
391ce775f4 upnp: add compatibility for miniupnpc 2.2.8 (Cory Fields)

Pull request description:

  Backports https://github.com/bitcoin/bitcoin/pull/30283 to the 26.x branch.

ACKs for top commit:
  edilmedeiros:
    ACK 10413ac46c
  theuni:
    ACK 10413ac46c

Tree-SHA512: 4a0f4eceefd5bbf9c97d19c4890b85963d56449856a56e6fe24161d3d6f37332de719da342d6c00ee67f2cd9434d849809a3cdc51719dc93219ec218c35a9f97
This commit is contained in:
merge-script 2024-06-24 13:37:23 +01:00
commit 6bbfdcfb6d
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1
2 changed files with 6 additions and 1 deletions

View file

@ -61,6 +61,7 @@ Notable changes
- #29747: depends: fix mingw-w64 Qt DEBUG=1 build
- #29985: depends: Fix build of Qt for 32-bit platforms with recent glibc
- #30151: depends: Fetch miniupnpc sources from an alternative website
- #30283: upnp: fix build with miniupnpc 2.2.8
### Misc
@ -76,6 +77,7 @@ Thanks to everyone who directly contributed to this release:
- Antoine Poinsot
- Ava Chow
- Cory Fields
- dergoegge
- fanquake
- glozow

View file

@ -163,8 +163,11 @@ static bool ProcessUpnp()
struct UPNPUrls urls;
struct IGDdatas data;
int r;
#if MINIUPNPC_API_VERSION <= 17
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
#else
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), nullptr, 0);
#endif
if (r == 1)
{
if (fDiscover) {