]>
Commit | Line | Data |
---|---|---|
0f37d0c8 | 1 | AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [ |
9baaa7de CC |
2 | dnl # |
3 | dnl # 4.7 API change | |
4 | dnl # | |
5 | AC_MSG_CHECKING([whether fops->iterate_shared() is available]) | |
0f37d0c8 RY |
6 | ZFS_LINUX_TRY_COMPILE([ |
7 | #include <linux/fs.h> | |
8 | int iterate(struct file *filp, struct dir_context * context) | |
9 | { return 0; } | |
10 | ||
11 | static const struct file_operations fops | |
12 | __attribute__ ((unused)) = { | |
9baaa7de | 13 | .iterate_shared = iterate, |
0f37d0c8 RY |
14 | }; |
15 | ],[ | |
16 | ],[ | |
17 | AC_MSG_RESULT(yes) | |
9baaa7de CC |
18 | AC_DEFINE(HAVE_VFS_ITERATE_SHARED, 1, |
19 | [fops->iterate_shared() is available]) | |
0f37d0c8 RY |
20 | ],[ |
21 | AC_MSG_RESULT(no) | |
22 | ||
9baaa7de CC |
23 | dnl # |
24 | dnl # 3.11 API change | |
25 | dnl # | |
26 | AC_MSG_CHECKING([whether fops->iterate() is available]) | |
0f37d0c8 RY |
27 | ZFS_LINUX_TRY_COMPILE([ |
28 | #include <linux/fs.h> | |
9baaa7de | 29 | int iterate(struct file *filp, struct dir_context * context) |
0f37d0c8 RY |
30 | { return 0; } |
31 | ||
32 | static const struct file_operations fops | |
33 | __attribute__ ((unused)) = { | |
9baaa7de | 34 | .iterate = iterate, |
0f37d0c8 RY |
35 | }; |
36 | ],[ | |
37 | ],[ | |
38 | AC_MSG_RESULT(yes) | |
9baaa7de CC |
39 | AC_DEFINE(HAVE_VFS_ITERATE, 1, |
40 | [fops->iterate() is available]) | |
0f37d0c8 | 41 | ],[ |
9baaa7de CC |
42 | AC_MSG_RESULT(no) |
43 | ||
44 | AC_MSG_CHECKING([whether fops->readdir() is available]) | |
45 | ZFS_LINUX_TRY_COMPILE([ | |
46 | #include <linux/fs.h> | |
47 | int readdir(struct file *filp, void *entry, filldir_t func) | |
48 | { return 0; } | |
0f37d0c8 | 49 | |
9baaa7de CC |
50 | static const struct file_operations fops |
51 | __attribute__ ((unused)) = { | |
52 | .readdir = readdir, | |
53 | }; | |
54 | ],[ | |
55 | ],[ | |
56 | AC_MSG_RESULT(yes) | |
57 | AC_DEFINE(HAVE_VFS_READDIR, 1, | |
58 | [fops->readdir() is available]) | |
59 | ],[ | |
60 | AC_MSG_ERROR(no; file a bug report with ZFSOnLinux) | |
61 | ]) | |
62 | ]) | |
0f37d0c8 RY |
63 | ]) |
64 | ]) |