2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fix configure test for dirfd() on Linux where DIR is opaque.

This commit is contained in:
Todd C. Miller
2008-06-20 21:16:09 +00:00
parent e37c901cdc
commit c372928c38
2 changed files with 2 additions and 2 deletions

2
configure vendored
View File

@@ -18063,7 +18063,7 @@ cat >>conftest.$ac_ext <<_ACEOF
int int
main () main ()
{ {
DIR d; (void)dirfd(&d); DIR *d; (void)dirfd(d);
; ;
return 0; return 0;
} }

View File

@@ -1811,7 +1811,7 @@ dnl
dnl Check for the dirfd function/macro. If not found, look for dd_fd in DIR. dnl Check for the dirfd function/macro. If not found, look for dd_fd in DIR.
dnl dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 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)])]) #include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])])
dnl dnl
dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS