posix:spawn: Use getdents64 when closefrom is not available.
* configure.ac (AC_CHECK_FUNCS): Check getdents64. * src/spawn-posix.c [!HAVE_CLOSEFROM] (get_max_fds): Use getdents64 instead of readdir, for AS-Safety.
closefrom is available with glibc >= 2.34.
getdents64 is available with glibc >= 2.30.
To support older glibc versions, we could use syscall as
GPGME does.
- GnuPG-bug-id: T7696
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>