summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-01-19 17:09:40 -0500
committerMike Gilbert <floppym@gentoo.org>2020-01-19 17:10:17 -0500
commite4ee5bf49c334a8cc527f23ca3a9f0b43fd34097 (patch)
treeea26bc5b71fd121f14e1d563ac11620d00b967ad /net-libs/libtirpc
parentapp-office/kmymoney: 5.0.8 version bump (diff)
downloadgentoo-e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097.tar.gz
gentoo-e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097.tar.bz2
gentoo-e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097.zip
net-libs/libtirpc: fix build with gcc 10
Closes: https://bugs.gentoo.org/705896 Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-libs/libtirpc')
-rw-r--r--net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch44
-rw-r--r--net-libs/libtirpc/libtirpc-1.2.5.ebuild5
2 files changed, 48 insertions, 1 deletions
diff --git a/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
new file mode 100644
index 000000000000..a5fecc54ced3
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
@@ -0,0 +1,44 @@
+From 69682de06816de9b9014441d23bda1918ee2e2fb Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 19 Jan 2020 16:57:45 -0500
+Subject: [PATCH] Avoid multiple-definiton with gcc -fno-common
+
+GCC 10 enables -fno-common by default.
+
+Bug: https://bugs.gentoo.org/705896
+---
+ src/rpc_com.h | 3 +--
+ src/svc.c | 3 +++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/rpc_com.h b/src/rpc_com.h
+index 10bec79..76badef 100644
+--- a/src/rpc_com.h
++++ b/src/rpc_com.h
+@@ -61,8 +61,7 @@ void __xprt_unregister_unlocked(SVCXPRT *);
+ void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
+
+
+-SVCXPRT **__svc_xports;
+-int __svc_maxrec;
++extern int __svc_maxrec;
+
+ #ifdef __cplusplus
+ }
+diff --git a/src/svc.c b/src/svc.c
+index b59467b..6db164b 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -57,6 +57,9 @@
+
+ #define max(a, b) (a > b ? a : b)
+
++static SVCXPRT **__svc_xports;
++int __svc_maxrec;
++
+ /*
+ * The services list
+ * Each entry represents a set of procedures (an rpc program).
+--
+2.25.0
+
diff --git a/net-libs/libtirpc/libtirpc-1.2.5.ebuild b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
index 5d80a874a922..9970a7e62550 100644
--- a/net-libs/libtirpc/libtirpc-1.2.5.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -23,6 +23,9 @@ BDEPEND="
src_prepare() {
cp -r "${WORKDIR}"/tirpc "${S}"/ || die
+ local PATCHES=(
+ "${FILESDIR}"/libtirpc-1.2.5-avoid-multiple-definition.patch
+ )
default
eautoreconf
}