diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-02-27 05:01:23 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2024-02-27 05:01:23 +0000 |
commit | 45b681ee03a1caebb65a89e4772a7afdcbacbf42 (patch) | |
tree | d110e9a0e804c80f92cd4eaaba351a46a90e198a /sysutils/coreutils | |
parent | 8e499572c780cdeb3668041f1ad5ca76a93531de (diff) | |
download | ports-45b681ee03a1caebb65a89e4772a7afdcbacbf42.tar.gz ports-45b681ee03a1caebb65a89e4772a7afdcbacbf42.zip |
sysutils/coreutils: Fix build with clang 18
PR: 277280
Approved by: maintainer
Diffstat (limited to 'sysutils/coreutils')
-rw-r--r-- | sysutils/coreutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/coreutils/files/patch-lib_posixtm.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile index a346bdc5e090..9264909a27ab 100644 --- a/sysutils/coreutils/Makefile +++ b/sysutils/coreutils/Makefile @@ -1,5 +1,6 @@ PORTNAME= coreutils PORTVERSION= 9.4 +PORTREVISION= 1 CATEGORIES= sysutils textproc MASTER_SITES= GNU diff --git a/sysutils/coreutils/files/patch-lib_posixtm.c b/sysutils/coreutils/files/patch-lib_posixtm.c new file mode 100644 index 000000000000..3265544a82bc --- /dev/null +++ b/sysutils/coreutils/files/patch-lib_posixtm.c @@ -0,0 +1,24 @@ +commit 67c298c36f69b6906840b7584be06b7b5f33f829 +Author: Paul Eggert <eggert@cs.ucla.edu> +Date: 2024-01-16T17:21:08-08:00 + + 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 thats not clangs fault. + +--- lib/posixtm.c.orig 2023-01-01 13:39:11 UTC ++++ lib/posixtm.c +@@ -191,7 +191,7 @@ posixtime (time_t *p, const char *s, unsigned int synt + | (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; |