/* Define to 1 to enable Linux audit support. */
#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. */
#undef HAVE_LOCKF
#define HAVE_DECL_SECCOMP_SET_MODE_FILTER $ac_have_decl
_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*)
# lockf() is broken on the Hurd
#include <linux/seccomp.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*)
# lockf() is broken on the Hurd
#endif
#include <sys/stat.h>
#include <sys/time.h>
-#ifdef __linux__
-#include <linux/types.h>
-#include <linux/random.h>
+#ifdef HAVE_SYS_SYSCALL
+# include <sys/syscall.h>
+#endif
+#ifdef HAVE_LINUX_RANDOM_H
+# include <linux/types.h>
+# include <linux/random.h>
#endif
#include <errno.h>
#include <fcntl.h>