summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch38
-rw-r--r--meta/recipes-core/coreutils/coreutils_9.4.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch b/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch
new file mode 100644
index 0000000000..e6c84be3c4
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch
@@ -0,0 +1,38 @@
1From 67c298c36f69b6906840b7584be06b7b5f33f829 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Tue, 16 Jan 2024 17:21:08 -0800
4Subject: [PATCH] posixtm: pacify clang 18
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Problem reported by Khem Raj in:
10https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html
11* lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int.
12Arguably this is a bug in draft C2x, since the non-pointer args to
13ckd_add should promote just like any other expressions do;
14but that’s not clang’s fault.
15
16Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00046.html]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 ChangeLog | 10 ++++++++++
20 lib/posixtm.c | 2 +-
21 2 files changed, 11 insertions(+), 1 deletion(-)
22
23diff --git a/lib/posixtm.c b/lib/posixtm.c
24index ef9f55f873..a072c7cad0 100644
25--- a/lib/posixtm.c
26+++ b/lib/posixtm.c
27@@ -191,7 +191,7 @@ posixtime (time_t *p, const char *s, unsigned int syntax_bits)
28 | (tm0.tm_min ^ tm1.tm_min)
29 | (tm0.tm_sec ^ tm1.tm_sec)))
30 {
31- if (ckd_add (&t, t, leapsec))
32+ if (ckd_add (&t, t, +leapsec))
33 return false;
34 *p = t;
35 return true;
36--
372.43.0
38
diff --git a/meta/recipes-core/coreutils/coreutils_9.4.bb b/meta/recipes-core/coreutils/coreutils_9.4.bb
index 367b011988..a79cabd3d2 100644
--- a/meta/recipes-core/coreutils/coreutils_9.4.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.4.bb
@@ -16,6 +16,7 @@ inherit autotools gettext texinfo
16SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ 16SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
17 file://remove-usr-local-lib-from-m4.patch \ 17 file://remove-usr-local-lib-from-m4.patch \
18 file://0001-local.mk-fix-cross-compiling-problem.patch \ 18 file://0001-local.mk-fix-cross-compiling-problem.patch \
19 file://0001-posixtm-pacify-clang-18.patch \
19 file://run-ptest \ 20 file://run-ptest \
20 " 21 "
21SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" 22SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52"