X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=config%2Fkernel-create-nameidata.m4;fp=config%2Fkernel-create-nameidata.m4;h=9aad46fece13b18a1021b5ff0e7e32fc5c8a1927;hb=c38367c73f592ca9729ba0d5e70b5e3bc67e0745;hp=100f07761240cabf3577d04a94d88024a029af38;hpb=8128bd89fb487d91a3335605b009ac2b7d5aecd3;p=zfs.git diff --git a/config/kernel-create-nameidata.m4 b/config/kernel-create-nameidata.m4 index 100f077..9aad46f 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 - ],[ + #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])