--- coreutils-8.32.orig/src/ls.c 2020-03-01 12:30:46.000000000 +0000 +++ coreutils-8.32/src/ls.c 2020-04-09 19:08:16.261088930 +0000 @@ -3023,7 +3023,7 @@ { /* 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 + if (syscall (SYS_getdents64, dirfd (dirp), NULL, 0) == -1 && errno != EINVAL) { /* We exclude EINVAL as that pertains to buffer handling,