aboutsummaryrefslogtreecommitdiffstats
path: root/tools/coreutils/patches/002-date-diagnose-f-read-errors.patch
diff options
context:
space:
mode:
authorGeorgi Valkov <gvalkov@gmail.com>2023-03-21 11:39:21 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2023-04-02 16:51:53 +0200
commit4467cf8e418e8003324990541b199d313b7c9235 (patch)
treeeb1ea978363a25849e916674b08a7f4ae9e6db26 /tools/coreutils/patches/002-date-diagnose-f-read-errors.patch
parent2715aff5df836c1d3eb8cbf5afdb0c197902ee4b (diff)
downloadupstream-4467cf8e418e8003324990541b199d313b7c9235.tar.gz
upstream-4467cf8e418e8003324990541b199d313b7c9235.tar.bz2
upstream-4467cf8e418e8003324990541b199d313b7c9235.zip
tools/coreutils: update to 9.2
This resolves an error when building toolchain/musl on macOS due to improper hole-detection caused by a bug in macOS/APFS [1]. As long as we don't reconfigure, 001-m4.patch is not needed. If we keep it, it will force reconfigure the project, since m4 files are changed. This works, but may not be optimal, because the build should use files from coreutils/m4, but OpenWRT uses legacy files from staging_dir/host/share/aclocal [2]. backport a couple of upstream patches date: diagnose -f read errors copy: fix --reflink=auto to fallback in more cases [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61386 [2] https://github.com/openwrt/openwrt/pull/12233#issuecomment-1481097456 Co-developed-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Diffstat (limited to 'tools/coreutils/patches/002-date-diagnose-f-read-errors.patch')
-rw-r--r--tools/coreutils/patches/002-date-diagnose-f-read-errors.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/coreutils/patches/002-date-diagnose-f-read-errors.patch b/tools/coreutils/patches/002-date-diagnose-f-read-errors.patch
new file mode 100644
index 0000000000..5174af1aa0
--- /dev/null
+++ b/tools/coreutils/patches/002-date-diagnose-f-read-errors.patch
@@ -0,0 +1,20 @@
+From 9c5e542fd190a14431092e3b6cb45d18fe95f26f Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Tue, 28 Mar 2023 01:52:43 -0700
+Subject: [PATCH] date: diagnose -f read errors
+
+* src/date.c (batch_convert): Diagnose read errors, fixing Bug#62497.
+---
+--- a/src/date.c
++++ b/src/date.c
+@@ -368,7 +368,9 @@ batch_convert (char const *input_filenam
+ ssize_t line_length = getline (&line, &buflen, in_stream);
+ if (line_length < 0)
+ {
+- /* FIXME: detect/handle error here. */
++ if (ferror (in_stream))
++ die (EXIT_FAILURE, errno, _("%s: read error"),
++ quotef (input_filename));
+ break;
+ }
+