mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
coreutils: Fix build with clang
Add a gnulib patch to fix build with clang-18 (From OE-Core rev: 8f661c567f773c22a03ec0991d700ee900c1f8d7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 67c298c36f69b6906840b7584be06b7b5f33f829 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Tue, 16 Jan 2024 17:21:08 -0800
|
||||
Subject: [PATCH] posixtm: pacify clang 18
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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.
|
||||
|
||||
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00046.html]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
ChangeLog | 10 ++++++++++
|
||||
lib/posixtm.c | 2 +-
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/posixtm.c b/lib/posixtm.c
|
||||
index ef9f55f873..a072c7cad0 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.43.0
|
||||
|
||||
@@ -16,6 +16,7 @@ inherit autotools gettext texinfo
|
||||
SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
|
||||
file://remove-usr-local-lib-from-m4.patch \
|
||||
file://0001-local.mk-fix-cross-compiling-problem.patch \
|
||||
file://0001-posixtm-pacify-clang-18.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52"
|
||||
|
||||
Reference in New Issue
Block a user