#
# kernel 2.6.13+ ->follow_link returns a cookie
#
-
AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
[AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
#include <linux/namei.h>
],[
- struct dentry dentry;
+ struct dentry *dentry = NULL;
struct nameidata nd;
- dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);
+ dentry->d_inode->i_op->put_link(dentry, &nd, NULL);
],[
AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie])
AC_MSG_RESULT([yes])
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- struct super_block sb;
+ struct super_block *sb = NULL;
- return sb.s_time_gran;
+ return sb->s_time_gran;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_S_TIME_GRAN, 1, [super block has s_time_gran member])
[AC_MSG_CHECKING([If kernel has security plug support])
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
+ #include <linux/stddef.h>
],[
- struct dentry *dentry;
- struct vfsmount *mnt;
- struct iattr *iattr;
-
- notify_change(dentry, mnt, iattr);
+ notify_change(NULL, NULL, NULL);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SECURITY_PLUG, 1,
#include <linux/fs.h>
],[
struct file_operations *fops = NULL;
- fl_owner_t id;
+ fl_owner_t id = NULL;
int i;
i = fops->flush(NULL, id);
#include <linux/err.h>
#include <linux/crypto.h>
],[
- struct hash_desc foo;
+ struct hash_desc foo __attribute__ ((unused));
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_STRUCT_HASH_DESC, 1, [kernel has struct hash_desc])
#include <linux/err.h>
#include <linux/crypto.h>
],[
- struct blkcipher_desc foo;
+ struct blkcipher_desc foo __attribute__ ((unused));
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_STRUCT_BLKCIPHER_DESC, 1, [kernel has struct blkcipher_desc])
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- int v = FS_RENAME_DOES_D_MOVE;
+ int v __attribute__ ((unused));
+ v = FS_RENAME_DOES_D_MOVE;
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FS_RENAME_DOES_D_MOVE, 1, [kernel has FS_RENAME_DOES_D_MOVE flag])
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- int i = unregister_blkdev(0,NULL);
+ int i __attribute__ ((unused));
+ i = unregister_blkdev(0,NULL);
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1,
LB_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- struct inode *inode;
+ struct inode *inode __attribute__ ((unused));
+
+ inode = NULL;
inode->i_op->permission(NULL, 0);
],[
AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
AC_DEFUN([LC_QUOTA_ON_5ARGS],
[AC_MSG_CHECKING([quota_on needs 5 parameters])
LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
#include <linux/quota.h>
],[
- struct quotactl_ops *qop;
+ struct quotactl_ops *qop = NULL;
qop->quota_on(NULL, 0, 0, NULL, 0);
],[
AC_DEFINE(HAVE_QUOTA_ON_5ARGS, 1,
AC_DEFUN([LC_QUOTA_OFF_3ARGS],
[AC_MSG_CHECKING([quota_off needs 3 parameters])
LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
#include <linux/quota.h>
],[
- struct quotactl_ops *qop;
+ struct quotactl_ops *qop = NULL;
qop->quota_off(NULL, 0, 0);
],[
AC_DEFINE(HAVE_QUOTA_OFF_3ARGS, 1,