Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysutils/coreutils: Fix build with clang 18
PR: 277280 Approved by: maintainer
- Loading branch information
1 parent
8e49957
commit 45b681e
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
PORTNAME= coreutils | ||
PORTVERSION= 9.4 | ||
PORTREVISION= 1 | ||
CATEGORIES= sysutils textproc | ||
MASTER_SITES= GNU | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |