mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Do not assume all Linux has linux/random.h.
Add missing sys/syscall.h include
This commit is contained in:
parent
fe58062547
commit
d876602dbf
@ -467,6 +467,9 @@
|
|||||||
/* Define to 1 to enable Linux audit support. */
|
/* Define to 1 to enable Linux audit support. */
|
||||||
#undef HAVE_LINUX_AUDIT
|
#undef HAVE_LINUX_AUDIT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <linux/random.h> header file. */
|
||||||
|
#undef HAVE_LINUX_RANDOM_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `lockf' function. */
|
/* Define to 1 if you have the `lockf' function. */
|
||||||
#undef HAVE_LOCKF
|
#undef HAVE_LOCKF
|
||||||
|
|
||||||
|
13
configure
vendored
13
configure
vendored
@ -15953,6 +15953,19 @@ cat >>confdefs.h <<_ACEOF
|
|||||||
#define HAVE_DECL_SECCOMP_SET_MODE_FILTER $ac_have_decl
|
#define HAVE_DECL_SECCOMP_SET_MODE_FILTER $ac_have_decl
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
# We call getrandom via syscall(3) in case it is not in libc
|
||||||
|
for ac_header in linux/random.h
|
||||||
|
do :
|
||||||
|
ac_fn_c_check_header_mongrel "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_header_linux_random_h" = xyes; then :
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_LINUX_RANDOM_H 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*-*-gnu*)
|
*-*-gnu*)
|
||||||
# lockf() is broken on the Hurd
|
# lockf() is broken on the Hurd
|
||||||
|
@ -2058,6 +2058,8 @@ case "$host" in
|
|||||||
#include <linux/seccomp.h>
|
#include <linux/seccomp.h>
|
||||||
#include <linux/filter.h>
|
#include <linux/filter.h>
|
||||||
])
|
])
|
||||||
|
# We call getrandom via syscall(3) in case it is not in libc
|
||||||
|
AC_CHECK_HEADERS([linux/random.h])
|
||||||
;;
|
;;
|
||||||
*-*-gnu*)
|
*-*-gnu*)
|
||||||
# lockf() is broken on the Hurd
|
# lockf() is broken on the Hurd
|
||||||
|
@ -35,9 +35,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifdef __linux__
|
#ifdef HAVE_SYS_SYSCALL
|
||||||
#include <linux/types.h>
|
# include <sys/syscall.h>
|
||||||
#include <linux/random.h>
|
#endif
|
||||||
|
#ifdef HAVE_LINUX_RANDOM_H
|
||||||
|
# include <linux/types.h>
|
||||||
|
# include <linux/random.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user