diff options
author | Martin Matuska <martin@matuska.org> | 2022-03-10 11:00:26 +0100 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2022-03-10 11:00:26 +0100 |
commit | 3f8f054ed16a3daa81d1e27c6d9e4194bf0e7e0c (patch) | |
tree | 362bf601b5db75e3e252fa09ea5e7eca84a404b5 /configure.ac | |
parent | 6cf2cd08021efe764ef22f978940076a8a76734e (diff) | |
download | libarchive-3f8f054ed16a3daa81d1e27c6d9e4194bf0e7e0c.tar.gz |
build: fix detection of readdir_r() and dirfd() in configure.ac
Fixes #1537
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 05aa0407..2c9e1f95 100644 --- a/configure.ac +++ b/configure.ac @@ -715,14 +715,14 @@ AC_CHECK_TYPES(struct statfs,,, # There are several variants of readdir_r around; we only # accept the POSIX-compliant version. -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include <dirent.h>]], [[DIR *dir; struct dirent e, *r; return(readdir_r(dir, &e, &r));]])], [AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have a POSIX compatible readdir_r])] ) # dirfd can be either a function or a macro. -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include <dirent.h> DIR *dir;]], [[return(dirfd(dir));]])], |