From 9d8bfae50fdaf5f5ec6307c60ebd1fad0927c6be Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 2 Sep 2020 21:21:35 +0200 Subject: patch 8.2.1570: configure check for dirfd() does not work on HPUX Problem: Configure check for dirfd() does not work on HPUX. (Michael Osipov) Solution: Use AC_TRY_LINK instead of AC_TRY_COMPILE. (closes #6838) --- src/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/configure.ac') diff --git a/src/configure.ac b/src/configure.ac index a2683a6b10..6176dc9ca5 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4013,7 +4013,7 @@ AC_TRY_LINK([#include ], [rename("this", "that")], dnl check for dirfd() AC_MSG_CHECKING(for dirfd) -AC_TRY_COMPILE( +AC_TRY_LINK( [#include #include ], [DIR * dir=opendir("dirname"); dirfd(dir);], @@ -4021,7 +4021,7 @@ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) dnl check for flock() AC_MSG_CHECKING(for flock) -AC_TRY_COMPILE( +AC_TRY_LINK( [#include ], [flock(10, LOCK_SH);], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) -- cgit v1.2.3