diff --git a/compat.h b/compat.h index 2d87cffc7..d4318e72e 100644 --- a/compat.h +++ b/compat.h @@ -206,8 +206,9 @@ typedef struct sigaction sigaction_t; /* * If dirfd() does not exists, hopefully dd_fd does. */ -#if !defined(HAVE_DIRFD) && !defined(dirfd) +#if !defined(HAVE_DIRFD) && defined(HAVE_DD_FD) # define dirfd(_d) ((_d)->dd_fd) +# define HAVE_DIRFD #endif /*