net-misc/wget: fix building with gcc-10
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 2 May 2020 18:08:31 +0000 (20:08 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 2 May 2020 18:10:59 +0000 (20:10 +0200)
Closes: https://bugs.gentoo.org/706458
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
net-misc/wget/files/wget-1.20.3-gcc10-fno-common.patch [new file with mode: 0644]
net-misc/wget/wget-1.20.3-r3.ebuild

diff --git a/net-misc/wget/files/wget-1.20.3-gcc10-fno-common.patch b/net-misc/wget/files/wget-1.20.3-gcc10-fno-common.patch
new file mode 100644 (file)
index 0000000..3b99f40
--- /dev/null
@@ -0,0 +1,32 @@
+From 04b7369490344d014b05dee5d48ca78cd04733ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Sat, 22 Feb 2020 13:40:50 +0100
+Subject: [PATCH] * tests/unit-tests.c: Fix 'multiple definition of...' with
+ gcc 10
+
+---
+ tests/unit-tests.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/unit-tests.c b/tests/unit-tests.c
+index 5fae8a219..f66e5e664 100644
+--- a/tests/unit-tests.c
++++ b/tests/unit-tests.c
+@@ -37,7 +37,7 @@ as that of the covered work.  */
+ #include "unit-tests.h"
+-const char *program_argstring = "TEST";
++extern const char *program_argstring;
+ static int tests_run;
+@@ -69,7 +69,7 @@ all_tests(void)
+   return NULL;
+ }
+-const char *program_name; /* Needed by lib/error.c. */
++extern const char *program_name; /* Needed by lib/error.c. */
+ int
+ main (int argc _GL_UNUSED, const char *argv[])
index dc1e481def735c2a90967e4d1d4f45540ed9315a..cc2ca822468ded6069cd98425b95493299df94fe 100644 (file)
@@ -54,6 +54,8 @@ BDEPEND="
 
 DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
 
+PATCHES=( "${FILESDIR}"/${P}-gcc10-fno-common.patch )
+
 pkg_setup() {
        use test && python-any-r1_pkg_setup
 }