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:
2
configure
vendored
2
configure
vendored
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user