linux-configure-support-mandrake-kernel-patches-20011023
[openafs.git] / src / cf / linux-test2.m4
index 99536c1..6a6a9db 100644 (file)
@@ -13,6 +13,21 @@ ac_cv_linux_fs_struct_inode_has_i_bytes=no)])
 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_bytes)
 CPPFLAGS="$save_CPPFLAGS"])
 
+AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM, [
+AC_MSG_CHECKING(for i_truncate_sem in struct inode)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _i;
+printf("%x\n", _i.i_truncate_sem);], 
+ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes,
+ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_truncate_sem)
+CPPFLAGS="$save_CPPFLAGS"])
+
 AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, [
 AC_MSG_CHECKING(for page_lock in struct address_space)
 save_CPPFLAGS="$CPPFLAGS"