On a glibc 2.7 system, a recent m4 tarball fails its tests, due to this: FAIL: test-fstatat ==================
../../tests/test-stat.h:49: assertion 'func ("", &st1) == -1' failed FAIL test-fstatat (exit status: 134) So, apparently, fstatat(_, "", _) succeeds instead of failing. fstatat is implemented as an inline function in the system headers. I don't think it's worth a workaround, as it's fixed in newer distros for many years already. 2021-05-13 Bruno Haible <br...@clisp.org> fstatat: Document a glibc 2.7 bug. * doc/posix-functions/fstatat.texi: Document an old glibc 2.7 bug. diff --git a/doc/posix-functions/fstatat.texi b/doc/posix-functions/fstatat.texi index b75f421..dee0330 100644 --- a/doc/posix-functions/fstatat.texi +++ b/doc/posix-functions/fstatat.texi @@ -35,5 +35,9 @@ offset from @code{tv_sec}. Portability problems not fixed by Gnulib: @itemize @item +This function does not fail when the second argument is an empty string +on some platforms: +glibc 2.7. +@item @xref{sys/stat.h}, for general portability problems with @code{struct stat}. @end itemize