diff --git a/configure.ac b/configure.ac index ef60461c6..82f859368 100644 --- a/configure.ac +++ b/configure.ac @@ -325,17 +325,16 @@ AC_CHECK_FUNCS( getpwent flock ) AC_MSG_CHECKING([dirfd]) AC_LINK_IFELSE([ - -#include - -DIR *dirp; - -int -main(void) -{ - return dirfd(dirp); -} -], [ AC_MSG_RESULT([yes]) + AC_LANG_PROGRAM( + [ + #include + DIR *dirp; + ], [ + return dirfd(dirp); + ] + ) + ] +, [ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_DIRFD], 1, [ Define to 1 if you have the `dirfd' function or macro. ]) ], [ AC_MSG_RESULT([no])]