From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A0DC1382C5 for ; Wed, 6 Jan 2021 23:23:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B96A6E0825; Wed, 6 Jan 2021 23:23:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A1F5EE0825 for ; Wed, 6 Jan 2021 23:23:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 548E5335D44 for ; Wed, 6 Jan 2021 23:23:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8F2C448E for ; Wed, 6 Jan 2021 23:23:07 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1609975371.4d9f459c5afd7b7fe9ae0068b4ad655606c3a544.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch net-misc/ntp/ntp-4.2.8_p15.ebuild X-VCS-Directories: net-misc/ntp/ net-misc/ntp/files/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 4d9f459c5afd7b7fe9ae0068b4ad655606c3a544 X-VCS-Branch: master Date: Wed, 6 Jan 2021 23:23:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9070943c-d108-4859-a209-91cfcd6245c9 X-Archives-Hash: fe9b0bfe0259ded0fdf777981e5e1d1b commit: 4d9f459c5afd7b7fe9ae0068b4ad655606c3a544 Author: Andreas K. Huettel gentoo org> AuthorDate: Wed Jan 6 23:22:23 2021 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Wed Jan 6 23:22:51 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d9f459c net-misc/ntp: Fix build with gcc-10 Closes: https://bugs.gentoo.org/759409 Bug: https://bugs.ntp.org/show_bug.cgi?id=3688 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andreas K. Huettel gentoo.org> net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch | 75 ++++++++++++++++++++++++++++ net-misc/ntp/ntp-4.2.8_p15.ebuild | 3 +- 2 files changed, 77 insertions(+), 1 deletion(-) 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 new file mode 100644 index 00000000000..619ea07558c --- /dev/null +++ b/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch @@ -0,0 +1,75 @@ + +Source: +https://bugs.ntp.org/show_bug.cgi?id=3688 + +Juergen Perlinger 2020-12-24 07:10:49 UTC +Created attachment 1760 [details] +ultimate patch, v00 + +--- a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100 ++++ a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100 +@@ -2,7 +2,7 @@ + + #include "log.h" + +-const char *progname; /* for msyslog use too */ ++extern const char *progname; /* for msyslog use too */ + + static int counter = 0; + +--- a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100 +@@ -20,7 +20,6 @@ + #include "log.h" + #include "libntp.h" + +- + int shutting_down; + int time_derived; + int time_adjusted; +--- a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100 +@@ -16,6 +16,14 @@ + + #include "crypto.h" + ++/* !Attention! 'progname' must de instantiated in any program that wants ++ * to use this library. Putting it into the library breaks a lot of ++ * things, since many programs define it itself and then the symbol ++ * might end up twice in the linker. ++ */ ++extern const char * progname; ++ ++ + void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode); + extern int sntp_main(int argc, char **argv, const char *); + int generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt, +--- a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100 +@@ -2,6 +2,8 @@ + + #include "main.h" + ++const char * progname; ++ + int + main ( + int argc, +--- a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100 +@@ -3,7 +3,6 @@ + #include "ntp_types.h" + + +-//#include "log.h" + #include "log.c" + + void setUp(void); +--- a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100 ++++ a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100 +@@ -5,4 +5,4 @@ + + time_t timefunc(time_t *ptr); + void settime(int y, int m, int d, int H, int M, int S); +-time_t nowtime; ++extern time_t nowtime; diff --git a/net-misc/ntp/ntp-4.2.8_p15.ebuild b/net-misc/ntp/ntp-4.2.8_p15.ebuild index 7864b4189d4..1405367f2d4 100644 --- a/net-misc/ntp/ntp-4.2.8_p15.ebuild +++ b/net-misc/ntp/ntp-4.2.8_p15.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -48,6 +48,7 @@ PATCHES=( "${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch "${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530 + "${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409 ) src_prepare() {