diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-21 18:26:41 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-21 18:30:15 -0500 |
commit | 2a6f4e0a224c3377de6f06a525b88eba8bc1ab7c (patch) | |
tree | b42f36c26923a39f2a767e936c96b338a620ecd3 | |
parent | dd0f0311d3ddf7ef0b43f2abf7b2452ebe079175 (diff) |
Add coreutils aarch64 fix until upstream fixes are in place.
-rw-r--r-- | coreutils-8.32-aarch64_fixes-1.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/coreutils-8.32-aarch64_fixes-1.patch b/coreutils-8.32-aarch64_fixes-1.patch new file mode 100644 index 0000000..ca50f32 --- /dev/null +++ b/coreutils-8.32-aarch64_fixes-1.patch @@ -0,0 +1,95 @@ +diff -Naur coreutils-8.32.orig/src/ls.c coreutils-8.32/src/ls.c +--- coreutils-8.32.orig/src/ls.c 2020-03-01 12:30:46.000000000 +0000 ++++ coreutils-8.32/src/ls.c 2021-04-18 13:14:13.298181255 +0000 +@@ -49,10 +49,6 @@ + # include <sys/ptem.h> + #endif + +-#ifdef __linux__ +-# include <sys/syscall.h> +-#endif +- + #include <stdio.h> + #include <assert.h> + #include <setjmp.h> +@@ -2896,7 +2892,6 @@ + struct dirent *next; + uintmax_t total_blocks = 0; + static bool first = true; +- bool found_any_entries = false; + + errno = 0; + dirp = opendir (name); +@@ -2972,7 +2967,6 @@ + next = readdir (dirp); + if (next) + { +- found_any_entries = true; + if (! file_ignored (next->d_name)) + { + enum filetype type = unknown; +@@ -3018,22 +3012,6 @@ + if (errno != EOVERFLOW) + break; + } +-#ifdef __linux__ +- else if (! found_any_entries) +- { +- /* If readdir finds no directory entries at all, not even "." or +- "..", then double check that the directory exists. */ +- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 +- && errno != EINVAL) +- { +- /* We exclude EINVAL as that pertains to buffer handling, +- and we've passed NULL as the buffer for simplicity. +- ENOENT is returned if appropriate before buffer handling. */ +- file_failure (command_line_arg, _("reading directory %s"), name); +- } +- break; +- } +-#endif + else + break; + +diff -Naur coreutils-8.32.orig/tests/ls/removed-directory.sh coreutils-8.32/tests/ls/removed-directory.sh +--- coreutils-8.32.orig/tests/ls/removed-directory.sh 2020-02-27 13:50:28.000000000 +0000 ++++ coreutils-8.32/tests/ls/removed-directory.sh 2021-04-18 13:16:54.181279118 +0000 +@@ -1,7 +1,7 @@ + #!/bin/sh + # If ls is asked to list a removed directory (e.g. the parent process's +-# current working directory that has been removed by another process), it +-# emits an error message. ++# current working directory has been removed by another process), it ++# should not emit an error message merely because the directory is removed. + + # Copyright (C) 2020 Free Software Foundation, Inc. + +@@ -21,25 +21,14 @@ + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src + print_ver_ ls + +-case $host_triplet in +- *linux*) ;; +- *) skip_ 'non linux kernel' ;; +-esac +- +-LS_FAILURE=2 +- +-cat <<\EOF >exp-err || framework_failure_ +-ls: reading directory '.': No such file or directory +-EOF +- + cwd=$(pwd) + mkdir d || framework_failure_ + cd d || framework_failure_ +-rmdir ../d || framework_failure_ ++rmdir ../d || skip_ "can't remove working directory on this platform" + +-returns_ $LS_FAILURE ls >../out 2>../err || fail=1 ++ls >../out 2>../err || fail=1 + cd "$cwd" || framework_failure_ + compare /dev/null out || fail=1 +-compare exp-err err || fail=1 ++compare /dev/null err || fail=1 + + Exit $fail |