Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
Date: Sun, 19 Jan 2020 22:10:31
Message-Id: 1579471817.e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097.floppym@gentoo
1 commit: e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 19 22:09:40 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 19 22:10:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4ee5bf4
7
8 net-libs/libtirpc: fix build with gcc 10
9
10 Closes: https://bugs.gentoo.org/705896
11 Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
12 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
13
14 .../libtirpc-1.2.5-avoid-multiple-definition.patch | 44 ++++++++++++++++++++++
15 net-libs/libtirpc/libtirpc-1.2.5.ebuild | 5 ++-
16 2 files changed, 48 insertions(+), 1 deletion(-)
17
18 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
19 new file mode 100644
20 index 00000000000..a5fecc54ced
21 --- /dev/null
22 +++ b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
23 @@ -0,0 +1,44 @@
24 +From 69682de06816de9b9014441d23bda1918ee2e2fb Mon Sep 17 00:00:00 2001
25 +From: Mike Gilbert <floppym@g.o>
26 +Date: Sun, 19 Jan 2020 16:57:45 -0500
27 +Subject: [PATCH] Avoid multiple-definiton with gcc -fno-common
28 +
29 +GCC 10 enables -fno-common by default.
30 +
31 +Bug: https://bugs.gentoo.org/705896
32 +---
33 + src/rpc_com.h | 3 +--
34 + src/svc.c | 3 +++
35 + 2 files changed, 4 insertions(+), 2 deletions(-)
36 +
37 +diff --git a/src/rpc_com.h b/src/rpc_com.h
38 +index 10bec79..76badef 100644
39 +--- a/src/rpc_com.h
40 ++++ b/src/rpc_com.h
41 +@@ -61,8 +61,7 @@ void __xprt_unregister_unlocked(SVCXPRT *);
42 + void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
43 +
44 +
45 +-SVCXPRT **__svc_xports;
46 +-int __svc_maxrec;
47 ++extern int __svc_maxrec;
48 +
49 + #ifdef __cplusplus
50 + }
51 +diff --git a/src/svc.c b/src/svc.c
52 +index b59467b..6db164b 100644
53 +--- a/src/svc.c
54 ++++ b/src/svc.c
55 +@@ -57,6 +57,9 @@
56 +
57 + #define max(a, b) (a > b ? a : b)
58 +
59 ++static SVCXPRT **__svc_xports;
60 ++int __svc_maxrec;
61 ++
62 + /*
63 + * The services list
64 + * Each entry represents a set of procedures (an rpc program).
65 +--
66 +2.25.0
67 +
68
69 diff --git a/net-libs/libtirpc/libtirpc-1.2.5.ebuild b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
70 index 5d80a874a92..9970a7e6255 100644
71 --- a/net-libs/libtirpc/libtirpc-1.2.5.ebuild
72 +++ b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
73 @@ -1,4 +1,4 @@
74 -# Copyright 1999-2019 Gentoo Authors
75 +# Copyright 1999-2020 Gentoo Authors
76 # Distributed under the terms of the GNU General Public License v2
77
78 EAPI=7
79 @@ -23,6 +23,9 @@ BDEPEND="
80
81 src_prepare() {
82 cp -r "${WORKDIR}"/tirpc "${S}"/ || die
83 + local PATCHES=(
84 + "${FILESDIR}"/libtirpc-1.2.5-avoid-multiple-definition.patch
85 + )
86 default
87 eautoreconf
88 }