1 |
commit: 4dc57685e11b9b63789f531bf7414e23a84a9a25 |
2 |
Author: Hanno Böck <hanno <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 3 11:40:49 2020 +0000 |
4 |
Commit: Hanno Böck <hanno <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 3 11:40:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dc57685 |
7 |
|
8 |
net-p2p/amule: Fix compilation with libupnp 1.14. |
9 |
|
10 |
Patch includes 2 upstream commits. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/740196 |
13 |
Signed-off-by: Hanno Böck <hanno <AT> gentoo.org> |
14 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
15 |
|
16 |
net-p2p/amule/amule-2.3.2-r5.ebuild | 1 + |
17 |
net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch | 24 ++++++++++++++++++++++ |
18 |
2 files changed, 25 insertions(+) |
19 |
|
20 |
diff --git a/net-p2p/amule/amule-2.3.2-r5.ebuild b/net-p2p/amule/amule-2.3.2-r5.ebuild |
21 |
index c35014cef8c..30856b93017 100644 |
22 |
--- a/net-p2p/amule/amule-2.3.2-r5.ebuild |
23 |
+++ b/net-p2p/amule/amule-2.3.2-r5.ebuild |
24 |
@@ -59,6 +59,7 @@ PATCHES=( |
25 |
"${FILESDIR}/${PN}-2.3.2-libupnp-1.6.patch" |
26 |
"${FILESDIR}/${PN}-2.3.2-Fixed-compilation-with-newer-bfd.patch" |
27 |
"${FILESDIR}/${PN}-2.3.2-desktop-mimetype.patch" |
28 |
+ "${FILESDIR}/${PN}-2.3.2-libupnp-1.14.patch" |
29 |
) |
30 |
|
31 |
pkg_setup() { |
32 |
|
33 |
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 |
34 |
new file mode 100644 |
35 |
index 00000000000..d68e4776e0a |
36 |
--- /dev/null |
37 |
+++ b/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch |
38 |
@@ -0,0 +1,24 @@ |
39 |
+--- a/src/UPnPBase.cpp 2016-09-16 09:55:07.000000000 +0200 |
40 |
++++ b/src/UPnPBase.cpp 2020-09-03 12:37:43.861231093 +0200 |
41 |
+@@ -824,13 +824,17 @@ m_WanService(NULL) |
42 |
+ // Null string at first |
43 |
+ std::ostringstream msg; |
44 |
+ |
45 |
++ // Declare those here to avoid |
46 |
++ // "jump to label ‘error’ [-fpermissive] crosses initialization |
47 |
++ // of ‘char* ipAddress’" |
48 |
++ unsigned short port; |
49 |
++ char *ipAddress; |
50 |
++ |
51 |
+ // Start UPnP |
52 |
+ int ret; |
53 |
+- char *ipAddress = NULL; |
54 |
+- unsigned short port = 0; |
55 |
+- ret = UpnpInit(ipAddress, udpPort); |
56 |
++ ret = UpnpInit2(0, udpPort); |
57 |
+ if (ret != UPNP_E_SUCCESS) { |
58 |
+- msg << "error(UpnpInit): Error code "; |
59 |
++ msg << "error(UpnpInit2): Error code "; |
60 |
+ goto error; |
61 |
+ } |
62 |
+ port = UpnpGetServerPort(); |