summaryrefslogtreecommitdiffstats
path: root/config/kernel-create-nameidata.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-create-nameidata.m4')
-rw-r--r--config/kernel-create-nameidata.m415
1 files changed, 9 insertions, 6 deletions
diff --git a/config/kernel-create-nameidata.m4 b/config/kernel-create-nameidata.m4
index 100f07761..9aad46fec 100644
--- a/config/kernel-create-nameidata.m4
+++ b/config/kernel-create-nameidata.m4
@@ -5,18 +5,21 @@ AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
AC_MSG_CHECKING([whether iops->create() takes struct nameidata])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
- ],[
+
#ifdef HAVE_MKDIR_UMODE_T
- int (*inode_create) (struct inode *,struct dentry *,
- umode_t, struct nameidata *) = NULL;
+ int inode_create(struct inode *inode ,struct dentry *dentry,
+ umode_t umode, struct nameidata *nidata) { return 0; }
#else
- int (*inode_create) (struct inode *,struct dentry *,
- int, struct nameidata *) = NULL;
+ int inode_create(struct inode *inode,struct dentry *dentry,
+ int umode, struct nameidata * nidata) { return 0; }
#endif
- struct inode_operations iops __attribute__ ((unused)) = {
+
+ static const struct inode_operations
+ iops __attribute__ ((unused)) = {
.create = inode_create,
};
],[
+ ],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
[iops->create() operation takes nameidata])