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/fileio.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/fileio.c') diff --git a/src/fileio.c b/src/fileio.c index 361109313..aa6596df6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -24,6 +24,11 @@ // Is there any system that doesn't have access()? #define USE_MCH_ACCESS +#if defined(__hpux) && !defined(HAVE_DIRFD) +# define dirfd(x) ((x)->__dd_fd) +# define HAVE_DIRFD +#endif + static char_u *next_fenc(char_u **pp, int *alloced); #ifdef FEAT_EVAL static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp); -- cgit v1.2.1