File: fix_netcpp_error.patch

package info (click to toggle)
litecoin 0.21.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 34,400 kB
  • sloc: cpp: 173,823; python: 35,653; ansic: 29,671; asm: 27,063; sh: 5,572; makefile: 1,562; java: 438; lisp: 169
file content (24 lines) | stat: -rw-r--r-- 926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Last-Update: 2025-01-29
Bug-Upstream: https://github.com/litecoin-project/litecoin/issues/1004
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087899
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076689
Forwarded: https://github.com/litecoin-project/litecoin/issues/1004
Author: Gui-Yue <yuemeng.gui@gmail.com>
Description: Fix FTBFS with miniupnpc 2.2.8 (error: too few arguments to function)

--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1637,7 +1637,12 @@
     struct IGDdatas data;
     int r;
 
-    r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
+    char errorMsg[256];
+    #if MINIUPNPC_API_VERSION >= 18
+        r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), errorMsg, sizeof(errorMsg));
+    #else
+        r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
+    #endif
     if (r == 1)
     {
         if (fDiscover) {