Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/taylor-uucp/files/, net-misc/taylor-uucp/
Date: Mon, 14 Sep 2020 23:53:51
Message-Id: 1600127129.bb2ff02e237f6b77ca3624c7a371e6dd3a4daa38.sam@gentoo
1 commit: bb2ff02e237f6b77ca3624c7a371e6dd3a4daa38
2 Author: Nicolas Boichat <drinkcat <AT> chromium <DOT> org>
3 AuthorDate: Fri Sep 11 05:34:17 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 14 23:45:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb2ff02e
7
8 net-misc/taylor-uucp: Remove external function declarations in unix/init.c
9
10 That makes the code compile with fewer warnings, and gets rid of this error
11 with recent Chrome OS toolchains:
12
13 init.c:100:14: error: redeclaration of 'getcwd' must have the 'overloadable' attribute
14 extern char *getcwd ();
15
16 ^
17 /build/amd64-generic/usr/include/bits/unistd.h:158:8: note: previous overload of function is here
18 __NTH (getcwd (char *const __clang_pass_object_size __buf, size_t __size))
19 ^
20
21 Signed-off-by: Nicolas Boichat <drinkcat <AT> chromium.org>
22 Closes: https://github.com/gentoo/gentoo/pull/17497
23 Signed-off-by: Sam James <sam <AT> gentoo.org>
24
25 .../files/taylor-uucp-1.07-remove-extern.patch | 67 ++++++++++++++++++++++
26 ...p-1.07-r3.ebuild => taylor-uucp-1.07-r4.ebuild} | 1 +
27 2 files changed, 68 insertions(+)
28
29 diff --git a/net-misc/taylor-uucp/files/taylor-uucp-1.07-remove-extern.patch b/net-misc/taylor-uucp/files/taylor-uucp-1.07-remove-extern.patch
30 new file mode 100644
31 index 00000000000..4a8efeeb83f
32 --- /dev/null
33 +++ b/net-misc/taylor-uucp/files/taylor-uucp-1.07-remove-extern.patch
34 @@ -0,0 +1,67 @@
35 +From 84b5bf1e6b8cfad657b88f8b061e172e327ef970 Mon Sep 17 00:00:00 2001
36 +From: Nicolas Boichat <drinkcat@××××××××.org>
37 +Date: Thu, 10 Sep 2020 17:06:37 +0800
38 +Subject: [PATCH] Remove external function declarations
39 +
40 +We need to redeclare functions that we already have.
41 +
42 +This causes issues with recent toolchains:
43 +init.c:100:14: error: redeclaration of 'getcwd' must have the 'overloadable' attribute
44 +extern char *getcwd ();
45 + ^
46 +/build/amd64-generic/usr/include/bits/unistd.h:158:8: note: previous overload of function is here
47 +__NTH (getcwd (char *const __clang_pass_object_size __buf, size_t __size))
48 + ^
49 +
50 +And also reduces the number of build warnings.
51 +
52 +This forked repo does the same thing in this (large) cleanup patch:
53 +https://github.com/quinot/taylor-uucp/commit/b599665ae1e085df0f96de5f50a738fceee02150
54 +---
55 + unix/init.c | 30 ------------------------------
56 + 1 file changed, 30 deletions(-)
57 +
58 +diff --git a/unix/init.c b/unix/init.c
59 +index d9d2147edd93..a9b7135be9f4 100644
60 +--- a/unix/init.c
61 ++++ b/unix/init.c
62 +@@ -81,36 +81,6 @@
63 + #endif /* ! defined (MAXPATHLEN) */
64 + #endif /* HAVE_GETWD */
65 +
66 +-/* External functions. */
67 +-#ifndef getlogin
68 +-extern char *getlogin ();
69 +-#endif
70 +-#if GETPWNAM_DECLARATION_OK
71 +-#ifndef getpwnam
72 +-extern struct passwd *getpwnam ();
73 +-#endif
74 +-#endif
75 +-#if GETPWUID_DECLARATION_OK
76 +-#ifndef getpwuid
77 +-extern struct passwd *getpwuid ();
78 +-#endif
79 +-#endif
80 +-#if HAVE_GETCWD
81 +-#ifndef getcwd
82 +-extern char *getcwd ();
83 +-#endif
84 +-#endif
85 +-#if HAVE_GETWD
86 +-#ifndef getwd
87 +-extern char *getwd ();
88 +-#endif
89 +-#endif
90 +-#if HAVE_SYSCONF
91 +-#ifndef sysconf
92 +-extern long sysconf ();
93 +-#endif
94 +-#endif
95 +-
96 + /* Initialize the system dependent routines. We will probably be running
97 + suid to uucp, so we make sure that nothing is obviously wrong. We
98 + save the login name since we will be losing the real uid. */
99 +--
100 +2.28.0.526.ge36021eeef-goog
101 +
102
103 diff --git a/net-misc/taylor-uucp/taylor-uucp-1.07-r3.ebuild b/net-misc/taylor-uucp/taylor-uucp-1.07-r4.ebuild
104 similarity index 96%
105 rename from net-misc/taylor-uucp/taylor-uucp-1.07-r3.ebuild
106 rename to net-misc/taylor-uucp/taylor-uucp-1.07-r4.ebuild
107 index c32b453cdee..1f216fb1763 100644
108 --- a/net-misc/taylor-uucp/taylor-uucp-1.07-r3.ebuild
109 +++ b/net-misc/taylor-uucp/taylor-uucp-1.07-r4.ebuild
110 @@ -18,6 +18,7 @@ S="${WORKDIR}/uucp-${PV}"
111 src_prepare() {
112 epatch "${FILESDIR}"/${P}-gentoo.patch
113 epatch "${FILESDIR}"/${P}-fprintf.patch
114 + epatch "${FILESDIR}"/${P}-remove-extern.patch
115 mv configure.{in,ac} || die
116 sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
117 eautoreconf