Define timestruc_t for Lustre compatibility
[zfs.git] / config / kernel-create-nameidata.m4
blobd4c155c57fc9171050a83fb78a3aa11640381134
1 dnl #
2 dnl # 3.6 API change
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
5         AC_MSG_CHECKING([whether iops->create() passes nameidata])
6         ZFS_LINUX_TRY_COMPILE([
7                 #include <linux/fs.h>
8                 #include <linux/sched.h>
10                 #ifdef HAVE_MKDIR_UMODE_T
11                 int inode_create(struct inode *inode ,struct dentry *dentry,
12                     umode_t umode, struct nameidata *nidata) { return 0; }
13                 #else
14                 int inode_create(struct inode *inode,struct dentry *dentry,
15                     int umode, struct nameidata * nidata) { return 0; }
16                 #endif
18                 static const struct inode_operations
19                     iops __attribute__ ((unused)) = {
20                         .create         = inode_create,
21                 };
22         ],[
23         ],[
24                 AC_MSG_RESULT(yes)
25                 AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
26                           [iops->create() passes nameidata])
27         ],[
28                 AC_MSG_RESULT(no)
29         ])