]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-mkdir-umode-t.m4
Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b
[FreeBSD/FreeBSD.git] / config / kernel-mkdir-umode-t.m4
1 dnl #
2 dnl # 3.3 API change
3 dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
4 dnl # umode_t type rather than an int.  The expectation is that any backport
5 dnl # would also change all three prototypes.  However, if it turns out that
6 dnl # some distribution doesn't backport the whole thing this could be
7 dnl # broken apart into three separate checks.
8 dnl #
9 AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR_UMODE_T], [
10         ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
11                 #include <linux/fs.h>
12
13                 int mkdir(struct inode *inode, struct dentry *dentry,
14                     umode_t umode) { return 0; }
15
16                 static const struct inode_operations
17                     iops __attribute__ ((unused)) = {
18                         .mkdir = mkdir,
19                 };
20         ],[])
21 ])
22
23 AC_DEFUN([ZFS_AC_KERNEL_MKDIR_UMODE_T], [
24         AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t])
25         ZFS_LINUX_TEST_RESULT([inode_operations_mkdir], [
26                 AC_MSG_RESULT(yes)
27                 AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
28                     [iops->create()/mkdir()/mknod() take umode_t])
29         ],[
30                 ZFS_LINUX_TEST_ERROR([mkdir()])
31         ])
32 ])