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)
diff --git a/src/globals.h b/src/globals.h
index 1a764b5..7dbc49e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -773,7 +773,8 @@
EXTERN int sc_col; // column for shown command
#ifdef TEMPDIRNAMES
-# if defined(UNIX) && defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+# if defined(UNIX) && defined(HAVE_FLOCK) \
+ && (defined(HAVE_DIRFD) || defined(__hpux))
EXTERN DIR *vim_tempdir_dp INIT(= NULL); // File descriptor of temp dir
# endif
EXTERN char_u *vim_tempdir INIT(= NULL); // Name of Vim's own temp dir.