commit: 4dc57685e11b9b63789f531bf7414e23a84a9a25 Author: Hanno Böck <hanno <AT> gentoo <DOT> org> AuthorDate: Thu Sep 3 11:40:49 2020 +0000 Commit: Hanno Böck <hanno <AT> gentoo <DOT> org> CommitDate: Thu Sep 3 11:40:49 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dc57685
net-p2p/amule: Fix compilation with libupnp 1.14. Patch includes 2 upstream commits. Closes: https://bugs.gentoo.org/740196 Signed-off-by: Hanno Böck <hanno <AT> gentoo.org> Package-Manager: Portage-3.0.5, Repoman-3.0.1 net-p2p/amule/amule-2.3.2-r5.ebuild | 1 + net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/net-p2p/amule/amule-2.3.2-r5.ebuild b/net-p2p/amule/amule-2.3.2-r5.ebuild index c35014cef8c..30856b93017 100644 --- a/net-p2p/amule/amule-2.3.2-r5.ebuild +++ b/net-p2p/amule/amule-2.3.2-r5.ebuild @@ -59,6 +59,7 @@ PATCHES=( "${FILESDIR}/${PN}-2.3.2-libupnp-1.6.patch" "${FILESDIR}/${PN}-2.3.2-Fixed-compilation-with-newer-bfd.patch" "${FILESDIR}/${PN}-2.3.2-desktop-mimetype.patch" + "${FILESDIR}/${PN}-2.3.2-libupnp-1.14.patch" ) pkg_setup() { diff --git a/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch b/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch new file mode 100644 index 00000000000..d68e4776e0a --- /dev/null +++ b/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch @@ -0,0 +1,24 @@ +--- a/src/UPnPBase.cpp 2016-09-16 09:55:07.000000000 +0200 ++++ b/src/UPnPBase.cpp 2020-09-03 12:37:43.861231093 +0200 +@@ -824,13 +824,17 @@ m_WanService(NULL) + // Null string at first + std::ostringstream msg; + ++ // Declare those here to avoid ++ // "jump to label ‘error’ [-fpermissive] crosses initialization ++ // of ‘char* ipAddress’" ++ unsigned short port; ++ char *ipAddress; ++ + // Start UPnP + int ret; +- char *ipAddress = NULL; +- unsigned short port = 0; +- ret = UpnpInit(ipAddress, udpPort); ++ ret = UpnpInit2(0, udpPort); + if (ret != UPNP_E_SUCCESS) { +- msg << "error(UpnpInit): Error code "; ++ msg << "error(UpnpInit2): Error code "; + goto error; + } + port = UpnpGetServerPort();