Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 916426 Details for
Bug 943787
net-proxy/dante-1.4.3 - [meson] [libtool] [gcc-15] upnp.c: error: too few arguments to function UPNP_GetValidIGD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0000-miniupnpc-2.2.8.patch
0000-miniupnpc-2.2.8.patch (text/plain), 8.07 KB, created by
Tamas Jantvik
on 2025-01-13 12:38:09 UTC
(
hide
)
Description:
0000-miniupnpc-2.2.8.patch
Filename:
MIME Type:
Creator:
Tamas Jantvik
Created:
2025-01-13 12:38:09 UTC
Size:
8.07 KB
patch
obsolete
>--- ./configure.orig 2021-04-30 21:29:06.000000000 +0200 >+++ ./configure 2025-01-13 12:34:10.259269138 +0100 >@@ -32805,6 +32805,49 @@ > LIBS=$oLIBS > fi > if test x"${have_libminiupnp}" = xt; then >+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for miniupnpc version >= 2.2.8" >&5 >+$as_echo_n "checking for miniupnpc version >= 2.2.8... " >&6; } >+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext >+/* end confdefs.h. */ >+ >+ #include <stdio.h> >+ #include <miniupnpc/miniupnpc.h> >+ #include <miniupnpc/upnpcommands.h> >+ #include <miniupnpc/upnperrors.h> >+int >+main () >+{ >+ >+ >+ #ifndef MINIUPNPC_API_VERSION >+ #error "no api version define" >+ #else >+ # if MINIUPNPC_API_VERSION < 18 >+ #error "api version too low" >+ # endif >+ #endif >+ ; >+ return 0; >+} >+_ACEOF >+if ac_fn_c_try_compile "$LINENO"; then : >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 >+$as_echo "yes" >&6; } >+ >+$as_echo "#define HAVE_LIBMINIUPNP 1" >>confdefs.h >+ >+ >+$as_echo "#define HAVE_LIBMINIUPNP228 1" >>confdefs.h >+ >+ unset no_upnp >+ SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB" >+ DLIBDEPS="${DLIBDEPS}${DLIBDEPS:+ }$UPNPLIB" >+else >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >+$as_echo "no" >&6; } >+fi >+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext >+ > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for miniupnpc version >= 1.7" >&5 > $as_echo_n "checking for miniupnpc version >= 1.7... " >&6; } > cat confdefs.h - <<_ACEOF >conftest.$ac_ext >@@ -32822,8 +32865,8 @@ > #ifndef MINIUPNPC_API_VERSION > #error "no api version define" > #else >- # if MINIUPNPC_API_VERSION < 8 >- #error "api version too low" >+ # if MINIUPNPC_API_VERSION < 8 || MINIUPNPC_API_VERSION > 17 >+ #error "api version too low or high" > # endif > #endif > ; >--- ./include/autoconf.h.in.orig 2021-04-30 21:29:27.000000000 +0200 >+++ ./include/autoconf.h.in 2025-01-13 13:18:20.846544677 +0100 >@@ -797,6 +797,9 @@ > /* UPNP support library 1.7 */ > #undef HAVE_LIBMINIUPNP17 > >+/* UPNP support library 2.2.8 */ >+#undef HAVE_LIBMINIUPNP228 >+ > /* Define to 1 if you have the `prldap60' library (-lprldap60). */ > #undef HAVE_LIBPRLDAP60 > >--- ./include/common.h.orig 2021-02-02 20:34:15.000000000 +0100 >+++ ./include/common.h 2025-01-13 13:16:32.969992076 +0100 >@@ -1404,9 +1404,20 @@ > /* return codes from UPNP_GetValidIGD(). */ > #define UPNP_NO_IGD (0) > #define UPNP_CONNECTED_IGD (1) >+ >+#if HAVE_LIBMINIUPNP228 >+ >+#define UPNP_RESERVED_IGD (2) >+#define UPNP_DISCONNECTED_IGD (3) >+#define UPNP_UNKNOWN_DEVICE (4) >+ >+#else /* !HAVE_LIBMINIUPNP_228 */ >+ > #define UPNP_DISCONNECTED_IGD (2) > #define UPNP_UNKNOWN_DEVICE (3) > >+#endif /* !HAVE_LIBMINIUPNP_228 */ >+ > #define UPNP_SUCCESS (1) > #define UPNP_FAILURE (2) > >--- ./include/redefac.h.orig 2021-04-30 21:48:32.000000000 +0200 >+++ ./include/redefac.h 2025-01-13 13:13:43.206075810 +0100 >@@ -1004,6 +1004,10 @@ > #define HAVE_LIBMINIUPNP17 0 > #endif > >+#ifndef HAVE_LIBMINIUPNP228 >+#define HAVE_LIBMINIUPNP228 0 >+#endif >+ > #ifndef HAVE_LIBPRLDAP60 > #define HAVE_LIBPRLDAP60 0 > #endif >--- ./lib/upnp.c.orig 2020-11-11 17:11:55.000000000 +0100 >+++ ./lib/upnp.c 2024-11-21 17:02:49.000000000 +0100 >@@ -42,7 +42,7 @@ > */ > > static const char rcsid[] = >-"$Id: upnp.c,v 1.153.4.4.2.2.4.2 2020/11/11 16:11:55 karls Exp $"; >+"$Id: upnp.c,v 1.153.4.4.2.2.4.2.4.1 2024/11/21 16:02:49 karls Exp $"; > > #include "common.h" > >@@ -154,7 +154,7 @@ > addrstring, > NULL, > 0 >-#if HAVE_LIBMINIUPNP17 >+#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 > ,0, > > #if MINIUPNPC_API_VERSION >= 14 >@@ -162,7 +162,7 @@ > #endif /* MINIUPNPC_API_VERSION >= 14 */ > > &rc >-#endif /* HAVE_LIBMINIUPNP17 */ >+#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */ > ); > > #if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC >@@ -208,7 +208,12 @@ > socks_autoadd_directroute(&commands, &protocols, &saddr, &smask); > } > >+#if HAVE_LIBMINIUPNP228 >+ devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr), >+ NULL, 0); >+#else /* !HAVE_LIBMINIUPNP228 */ > devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr)); >+#endif /* !HAVE_LIBMINIUPNP228 */ > switch (devtype) { > case UPNP_NO_IGD: > snprintf(emsg, emsglen, "no UPNP IGD discovered on local network"); >@@ -226,6 +231,20 @@ > rc = 0; > break; > >+#if HAVE_LIBMINIUPNP228 >+ case UPNP_RESERVED_IGD: >+ snprintf(emsg, emsglen, >+ "UPNP IGD discovered at url %s, but its IP is reserved", >+ str2vis(url.controlURL, >+ strlen(url.controlURL), >+ vbuf, >+ sizeof(vbuf))); >+ >+ swarnx("%s: %s", function, emsg); >+ rc = -1; >+ break; >+#endif /* HAVE_LIBMINIUPNP228 */ >+ > case UPNP_DISCONNECTED_IGD: > snprintf(emsg, emsglen, > "UPNP IGD discovered at url %s, but it is not connected", >@@ -273,12 +292,12 @@ > #if HAVE_LIBMINIUPNP13 > STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.servicetype); > >-#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 >+#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 > STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.CIF.servicetype); > > #else > # error "unexpected miniupnp version" >-#endif /* HAVE_LIBMINIUPNP17 */ >+#endif /* HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */ > > slog(LOG_NEGOTIATE, "%s: inited ok. controlurl: %s, servicetype: %s", > function, >@@ -756,9 +775,9 @@ > buf, > protocol, > NULL >-#if HAVE_LIBMINIUPNP17 >+#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 > ,0 >-#endif /* HAVE_LIBMINIUPNP17 */ >+#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */ > )) != UPNPCOMMAND_SUCCESS) { > snprintf(emsg, emsglen, > "UPNP_AddPortMapping() failed: %s", strupnperror(rc)); >--- ./miniupnpc.m4.orig 2012-11-02 13:08:14.000000000 +0100 >+++ ./miniupnpc.m4 2024-11-21 17:02:49.000000000 +0100 >@@ -20,7 +20,7 @@ > LIBS=$oLIBS > fi > if test x"${have_libminiupnp}" = xt; then >- AC_MSG_CHECKING([for miniupnpc version >= 1.7]) >+ AC_MSG_CHECKING([for miniupnpc version >= 2.2.8]) > AC_TRY_COMPILE([ > #include <stdio.h> > #include <miniupnpc/miniupnpc.h> >@@ -30,11 +30,33 @@ > #ifndef MINIUPNPC_API_VERSION > #error "no api version define" > #else >- # if MINIUPNPC_API_VERSION < 8 >+ # if MINIUPNPC_API_VERSION < 18 > #error "api version too low" > # endif > #endif], > [AC_MSG_RESULT(yes) >+ AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library]) >+ AC_DEFINE(HAVE_LIBMINIUPNP228, 1, [UPNP support library 2.2.8]) >+ unset no_upnp >+ SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB" >+ DLIBDEPS="${DLIBDEPS}${DLIBDEPS:+ }$UPNPLIB"], >+ [AC_MSG_RESULT(no)]) >+ >+ AC_MSG_CHECKING([for miniupnpc version >= 1.7]) >+ AC_TRY_COMPILE([ >+ #include <stdio.h> >+ #include <miniupnpc/miniupnpc.h> >+ #include <miniupnpc/upnpcommands.h> >+ #include <miniupnpc/upnperrors.h>], [ >+ >+ #ifndef MINIUPNPC_API_VERSION >+ #error "no api version define" >+ #else >+ # if MINIUPNPC_API_VERSION < 8 || MINIUPNPC_API_VERSION > 17 >+ #error "api version too low or high" >+ # endif >+ #endif], >+ [AC_MSG_RESULT(yes) > AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library]) > AC_DEFINE(HAVE_LIBMINIUPNP17, 1, [UPNP support library 1.7]) > unset no_upnp
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 943787
:
909043
|
909044
|
909045
|
909046
|
909047
|
909048
|
909049
|
909050
|
909051
| 916426