From: Martin Matuska Date: Thu, 10 Mar 2022 10:00:26 +0000 (+0100) Subject: build: fix detection of readdir_r() and dirfd() in configure.ac X-Git-Tag: v3.6.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f8f054ed16a3daa81d1e27c6d9e4194bf0e7e0c;p=thirdparty%2Flibarchive.git build: fix detection of readdir_r() and dirfd() in configure.ac Fixes #1537 --- diff --git a/configure.ac b/configure.ac index 05aa0407b..2c9e1f957 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 ]], [[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 DIR *dir;]], [[return(dirfd(dir));]])],