commit: 6450b7da06ef548b252bf5ae7605cdd6c7bd9fb6 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Sep 7 21:52:01 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Sep 7 21:52:01 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6450b7da
net-misc/ntp: fix modern C issue (with cross) Closes: https://bugs.gentoo.org/956643 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/ntp/files/ntp-4.2.8_p18-c99.patch | 18 ++++++++++++++++++ .../{ntp-4.2.8_p18.ebuild => ntp-4.2.8_p18-r1.ebuild} | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/net-misc/ntp/files/ntp-4.2.8_p18-c99.patch b/net-misc/ntp/files/ntp-4.2.8_p18-c99.patch new file mode 100644 index 000000000000..0bba3d37e643 --- /dev/null +++ b/net-misc/ntp/files/ntp-4.2.8_p18-c99.patch @@ -0,0 +1,18 @@ +https://bugs.gentoo.org/956643 +https://bugs.ntp.org/show_bug.cgi?id=3981 + +--- a/libntp/machines.c ++++ b/libntp/machines.c +@@ -477,10 +477,8 @@ + #endif /* HAVE_SETTIMEOFDAY */ + #ifdef HAVE_STIME + if (rc && (SET_TOD_STIME == tod || !tod)) { +- long tp = tvp->tv_sec; +- + errno = 0; +- rc = stime(&tp); /* lie as bad as SysVR4 */ ++ rc = stime(&tvp->tv_sec); + saved_errno = errno; + TRACE(1, ("ntp_set_tod: stime: %d %m\n", rc)); + if (!tod && !rc) + diff --git a/net-misc/ntp/ntp-4.2.8_p18.ebuild b/net-misc/ntp/ntp-4.2.8_p18-r1.ebuild similarity index 98% rename from net-misc/ntp/ntp-4.2.8_p18.ebuild rename to net-misc/ntp/ntp-4.2.8_p18-r1.ebuild index 9f479d4d4f6f..ed9bfd6f833b 100644 --- a/net-misc/ntp/ntp-4.2.8_p18.ebuild +++ b/net-misc/ntp/ntp-4.2.8_p18-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -46,6 +46,7 @@ PATCHES=( "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch # bug #563922 "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch # bug #711530 "${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch + "${FILESDIR}"/${PN}-4.2.8_p18-c99.patch # bug #956643 ) src_prepare() {
