diff --git a/backport-posixtm-pacify-clang-18.patch b/backport-posixtm-pacify-clang-18.patch new file mode 100644 index 0000000000000000000000000000000000000000..e337b7cbb63c069fccae28ef32ab3e11dfa4a3a5 --- /dev/null +++ b/backport-posixtm-pacify-clang-18.patch @@ -0,0 +1,33 @@ +From 67c298c36f69b6906840b7584be06b7b5f33f829 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Tue, 16 Jan 2024 17:21:08 -0800 +Subject: [PATCH] posixtm: pacify clang 18 + +Problem reported by Khem Raj in: +https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html +* lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int. +Arguably this is a bug in draft C2x, since the non-pointer args to +ckd_add should promote just like any other expressions do; +but that’s not clang’s fault. + +Reference: https://github.com/coreutils/gnulib/commit/67c298c36f69b6906840b7584be06b7b5f33f829 +--- + lib/posixtm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/posixtm.c b/lib/posixtm.c +index 43d65f5..1c4e344 100644 +--- a/lib/posixtm.c ++++ b/lib/posixtm.c +@@ -191,7 +191,7 @@ posixtime (time_t *p, const char *s, unsigned int syntax_bits) + | (tm0.tm_min ^ tm1.tm_min) + | (tm0.tm_sec ^ tm1.tm_sec))) + { +- if (ckd_add (&t, t, leapsec)) ++ if (ckd_add (&t, t, +leapsec)) + return false; + *p = t; + return true; +-- +2.50.1 + diff --git a/coreutils.spec b/coreutils.spec index 38b6cc1742c41b144f529ca77b54ee4327a6a7ba..7dea1b1241a62582ea7a93307b9a5a155c7d3d67 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils Version: 9.4 -Release: 17 +Release: 18 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -45,6 +45,7 @@ Patch30: backport-yes-avoid-failure-on-CHERI-protected-systems.patch Patch31: backport-cat-fix-plain-cat-bug.patch Patch32: backport-tail-avoid-infloop-with-c-on-dev-zero.patch Patch33: backport-CVE-2025-5278.patch +Patch34: backport-posixtm-pacify-clang-18.patch Patch9001: coreutils-9.0-sw.patch @@ -189,6 +190,9 @@ fi %{_mandir}/man*/* %changelog +* Mon Jul 14 2025 jchzhou - 9.4-18 +- backport a patch to address clang building issues + * Sat May 31 2025 Funda Wang - 9.4-17 - fix CVE-2025-5278