mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Fix configure test for dirfd() on Linux where DIR is opaque.
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -18063,7 +18063,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
DIR d; (void)dirfd(&d);
|
||||
DIR *d; (void)dirfd(d);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1811,7 +1811,7 @@ dnl
|
||||
dnl Check for the dirfd function/macro. If not found, look for dd_fd in DIR.
|
||||
dnl
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <$ac_header_dirent>]], [[DIR d; (void)dirfd(&d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <$ac_header_dirent>]], [[DIR *d; (void)dirfd(d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])])
|
||||
dnl
|
||||
dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS
|
||||
|
Reference in New Issue
Block a user