From 3f8f054ed16a3daa81d1e27c6d9e4194bf0e7e0c Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Thu, 10 Mar 2022 11:00:26 +0100 Subject: [PATCH] build: fix detection of readdir_r() and dirfd() in configure.ac Fixes #1537 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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));]])], -- 2.47.2