ac_cv_linux_kernel_posix_lock_file_wait_arg=no)])
AC_MSG_RESULT($ac_cv_linux_kernel_posix_lock_file_wait_arg)])
-
AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
AC_MSG_CHECKING([for 5th argument in sock_create found in some SELinux kernels])
AC_CACHE_VAL([ac_cv_linux_kernel_sock_create_v], [
AC_MSG_CHECKING([if key_alloc() takes a struct task *])
AC_CACHE_VAL([ac_cv_key_alloc_needs_struct_task], [
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -Werror"
+ CPPFLAGS="$CPPFLAGS -Werror -Wno-pointer-arith"
AC_TRY_KBUILD(
[#include <linux/rwsem.h>
#include <linux/key.h>
AC_MSG_CHECKING([if key_alloc() takes credentials])
AC_CACHE_VAL([ac_cv_key_alloc_needs_cred], [
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -Werror"
+ CPPFLAGS="$CPPFLAGS -Werror -Wno-pointer-arith"
AC_TRY_KBUILD(
[#include <linux/rwsem.h>
#include <linux/key.h>
AC_DEFINE([HAVE_GRAB_CACHE_PAGE_WRITE_BEGIN], 1, [define if your kernel has grab_cache_page_write_begin()])
fi])
+AC_DEFUN([LINUX_HAVE_PAGEVEC_LRU_ADD_FILE], [
+ AC_MSG_CHECKING([for linux __pagevec_lru_add_file()])
+ AC_CACHE_VAL([ac_cv_linux_pagevec_add_file], [
+ AC_TRY_KBUILD(
+[#include <linux/pagevec.h>],
+[__pagevec_lru_add_file(NULL);],
+ ac_cv_linux_pagevec_add_file=yes,
+ ac_cv_linux_pagevec_add_file=no)])
+ AC_MSG_RESULT($ac_cv_linux_pagevec_add_file)
+ if test "x$ac_cv_linux_pagevec_add_file" = "xyes"; then
+ AC_DEFINE([HAVE_PAGEVEC_LRU_ADD_FILE], 1, [define if your kernel has __pagevec_lru_add_file()])
+ fi])
+
AC_DEFUN([LINUX_STRUCT_TASK_HAS_CRED], [
AC_MSG_CHECKING([if struct task has cred])
AC_CACHE_VAL([ac_cv_linux_struct_task_has_cred], [
if test "x$ac_cv_linux_struct_proc_dir_entry_has_owner" = "xyes"; then
AC_DEFINE([STRUCT_PROC_DIR_ENTRY_HAS_OWNER], 1, [define if struct proc_dir_entry has an owner member])
fi])
+
+AC_DEFUN([LINUX_POSIX_TEST_LOCK_RETURNS_CONFLICT], [
+ AC_MSG_CHECKING([if posix_test_lock returns a struct file_lock])
+ AC_CACHE_VAL([ac_cv_linux_posix_test_lock_returns_conflict], [
+ AC_TRY_KBUILD(
+[#include <linux/fs.h>],
+[struct file_lock *lock;
+ struct file * file;
+lock = posix_test_lock(file, lock);],
+ ac_cv_linux_posix_test_lock_returns_conflict=yes,
+ ac_cv_linux_posix_test_lock_returns_conflict=no)])
+ AC_MSG_RESULT($ac_cv_linux_posix_test_lock_returns_conflict)
+ if test "x$ac_cv_linux_posix_test_lock_returns_conflict" = "xyes"; then
+ AC_DEFINE([POSIX_TEST_LOCK_RETURNS_CONFLICT], 1, [define if posix_test_lock returns the conflicting lock])
+ fi])
+
+AC_DEFUN([LINUX_POSIX_TEST_LOCK_CONFLICT_ARG], [
+ AC_MSG_CHECKING([if posix_test_lock takes a conflict argument])
+ AC_CACHE_VAL([ac_cv_linux_posix_test_lock_conflict_arg], [
+ AC_TRY_KBUILD(
+[#include <linux/fs.h>],
+[ struct file_lock *lock;
+ struct file *file;
+ posix_test_lock(file, lock, lock);],
+ ac_cv_linux_posix_test_lock_conflict_arg=yes,
+ ac_cv_lonuc_posix_test_lock_conflict_arg=no)])
+ AC_MSG_RESULT($ac_cv_linux_posix_test_lock_conflict_arg)
+ if test "x$ac_cv_linux_posix_test_lock_conflict_arg" = "xyes"; then
+ AC_DEFINE([POSIX_TEST_LOCK_CONFLICT_ARG], 1, [define if posix_test_lock takes a conflict argument])
+ fi])
+
+AC_DEFUN([LINUX_EXPORTS_KEY_TYPE_KEYRING], [
+ AC_MSG_CHECKING([for exported key_type_keyring])
+ AC_CACHE_VAL([ac_cv_linux_exports_key_type_keyring], [
+ AC_TRY_KBUILD(
+[
+#ifdef KEY_TYPE_H_EXISTS
+#include <linux/key-type.h>
+#endif
+#include <linux/key.h>],
+[
+printk("%s", key_type_keyring.name);
+],
+ ac_cv_linux_exports_key_type_keyring=yes,
+ ac_cv_linux_exports_key_type_keyring=no)])
+ AC_MSG_RESULT($ac_cv_linux_exports_key_type_keyring)
+ if test "x$ac_cv_linux_exports_key_type_keyring" = "xyes"; then
+ AC_DEFINE([EXPORTED_KEY_TYPE_KEYRING], 1, [define if key_type_keyring is exported])
+ fi])
+
+AC_DEFUN([LINUX_KEYS_HAVE_SESSION_TO_PARENT], [
+ AC_MSG_CHECKING([for KEYCTL_SESSION_TO_PARENT])
+ AC_CACHE_VAL([ac_cv_linux_have_session_to_parent], [
+ AC_TRY_KBUILD(
+[ #include <linux/keyctl.h>],
+[ int i = KEYCTL_SESSION_TO_PARENT;],
+ ac_cv_linux_have_session_to_parent=yes,
+ ac_cv_linux_have_session_to_parent=no)])
+ AC_MSG_RESULT($ac_cv_linux_have_session_to_parent)
+ if test "x$ac_cv_linux_have_session_to_parent" = "xyes"; then
+ AC_DEFINE([HAVE_SESSION_TO_PARENT], 1, [define if keyctl has the KEYCTL_SESSION_TO_PARENT function])
+ fi])