]> granicus.if.org Git - zfs/blob - config/kernel-vfs-getattr.m4
Check for strlcat and strlcpy
[zfs] / config / kernel-vfs-getattr.m4
1 dnl #
2 dnl # 4.11 API, a528d35e@torvalds/linux
3 dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f)
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_4ARGS_VFS_GETATTR], [
6         AC_MSG_CHECKING([whether vfs_getattr() wants 4 args])
7         ZFS_LINUX_TRY_COMPILE([
8                 #include <linux/fs.h>
9         ],[
10                 vfs_getattr((const struct path *)NULL,
11                         (struct kstat *)NULL,
12                         (u32)0,
13                         (unsigned int)0);
14         ],[
15                 AC_MSG_RESULT(yes)
16                 AC_DEFINE(HAVE_4ARGS_VFS_GETATTR, 1,
17                   [vfs_getattr wants 4 args])
18         ],[
19                 AC_MSG_RESULT(no)
20         ])
21 ])
22
23 dnl #
24 dnl # 3.9 API
25 dnl # vfs_getattr(struct path *p, struct kstat *s)
26 dnl #
27 AC_DEFUN([ZFS_AC_KERNEL_2ARGS_VFS_GETATTR], [
28         AC_MSG_CHECKING([whether vfs_getattr() wants 2 args])
29         ZFS_LINUX_TRY_COMPILE([
30                 #include <linux/fs.h>
31         ],[
32                 vfs_getattr((struct path *) NULL,
33                         (struct kstat *)NULL);
34         ],[
35                 AC_MSG_RESULT(yes)
36                 AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1,
37                           [vfs_getattr wants 2 args])
38         ],[
39                 AC_MSG_RESULT(no)
40         ])
41 ])
42
43 dnl #
44 dnl # <3.9 API
45 dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k)
46 dnl #
47 AC_DEFUN([ZFS_AC_KERNEL_3ARGS_VFS_GETATTR], [
48         AC_MSG_CHECKING([whether vfs_getattr() wants 3 args])
49         ZFS_LINUX_TRY_COMPILE([
50                 #include <linux/fs.h>
51         ],[
52                 vfs_getattr((struct vfsmount *)NULL,
53                         (struct dentry *)NULL,
54                         (struct kstat *)NULL);
55         ],[
56                 AC_MSG_RESULT(yes)
57                 AC_DEFINE(HAVE_3ARGS_VFS_GETATTR, 1,
58                   [vfs_getattr wants 3 args])
59         ],[
60                 AC_MSG_RESULT(no)
61         ])
62 ])