Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
Date: Wed, 06 Jan 2021 23:23:12
Message-Id: 1609975371.4d9f459c5afd7b7fe9ae0068b4ad655606c3a544.dilfridge@gentoo
1 commit: 4d9f459c5afd7b7fe9ae0068b4ad655606c3a544
2 Author: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 6 23:22:23 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 6 23:22:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d9f459c
7
8 net-misc/ntp: Fix build with gcc-10
9
10 Closes: https://bugs.gentoo.org/759409
11 Bug: https://bugs.ntp.org/show_bug.cgi?id=3688
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org>
14
15 net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch | 75 ++++++++++++++++++++++++++++
16 net-misc/ntp/ntp-4.2.8_p15.ebuild | 3 +-
17 2 files changed, 77 insertions(+), 1 deletion(-)
18
19 diff --git a/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch b/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch
20 new file mode 100644
21 index 00000000000..619ea07558c
22 --- /dev/null
23 +++ b/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch
24 @@ -0,0 +1,75 @@
25 +
26 +Source:
27 +https://bugs.ntp.org/show_bug.cgi?id=3688
28 +
29 +Juergen Perlinger 2020-12-24 07:10:49 UTC
30 +Created attachment 1760 [details]
31 +ultimate patch, v00
32 +
33 +--- a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100
34 ++++ a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100
35 +@@ -2,7 +2,7 @@
36 +
37 + #include "log.h"
38 +
39 +-const char *progname; /* for msyslog use too */
40 ++extern const char *progname; /* for msyslog use too */
41 +
42 + static int counter = 0;
43 +
44 +--- a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100
45 ++++ a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100
46 +@@ -20,7 +20,6 @@
47 + #include "log.h"
48 + #include "libntp.h"
49 +
50 +-
51 + int shutting_down;
52 + int time_derived;
53 + int time_adjusted;
54 +--- a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100
55 ++++ a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100
56 +@@ -16,6 +16,14 @@
57 +
58 + #include "crypto.h"
59 +
60 ++/* !Attention! 'progname' must de instantiated in any program that wants
61 ++ * to use this library. Putting it into the library breaks a lot of
62 ++ * things, since many programs define it itself and then the symbol
63 ++ * might end up twice in the linker.
64 ++ */
65 ++extern const char * progname;
66 ++
67 ++
68 + void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode);
69 + extern int sntp_main(int argc, char **argv, const char *);
70 + int generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt,
71 +--- a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100
72 ++++ a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100
73 +@@ -2,6 +2,8 @@
74 +
75 + #include "main.h"
76 +
77 ++const char * progname;
78 ++
79 + int
80 + main (
81 + int argc,
82 +--- a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100
83 ++++ a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100
84 +@@ -3,7 +3,6 @@
85 + #include "ntp_types.h"
86 +
87 +
88 +-//#include "log.h"
89 + #include "log.c"
90 +
91 + void setUp(void);
92 +--- a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100
93 ++++ a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100
94 +@@ -5,4 +5,4 @@
95 +
96 + time_t timefunc(time_t *ptr);
97 + void settime(int y, int m, int d, int H, int M, int S);
98 +-time_t nowtime;
99 ++extern time_t nowtime;
100
101 diff --git a/net-misc/ntp/ntp-4.2.8_p15.ebuild b/net-misc/ntp/ntp-4.2.8_p15.ebuild
102 index 7864b4189d4..1405367f2d4 100644
103 --- a/net-misc/ntp/ntp-4.2.8_p15.ebuild
104 +++ b/net-misc/ntp/ntp-4.2.8_p15.ebuild
105 @@ -1,4 +1,4 @@
106 -# Copyright 1999-2020 Gentoo Authors
107 +# Copyright 1999-2021 Gentoo Authors
108 # Distributed under the terms of the GNU General Public License v2
109
110 EAPI=7
111 @@ -48,6 +48,7 @@ PATCHES=(
112 "${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
113 "${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch
114 "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
115 + "${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
116 )
117
118 src_prepare() {