]>
Commit | Line | Data |
---|---|---|
c06d4368 AX |
1 | dnl # |
2 | dnl # 3.11 API change | |
3 | dnl # | |
4 | AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [ | |
5 | AC_MSG_CHECKING([whether fops->iterate() is available]) | |
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)) = { | |
13 | .iterate = iterate, | |
14 | }; | |
15 | ],[ | |
16 | ],[ | |
17 | AC_MSG_RESULT(yes) | |
18 | AC_DEFINE(HAVE_VFS_ITERATE, 1, | |
19 | [fops->iterate() is available]) | |
20 | ],[ | |
21 | AC_MSG_RESULT(no) | |
22 | ||
23 | AC_MSG_CHECKING([whether fops->readdir() is available]) | |
24 | ZFS_LINUX_TRY_COMPILE([ | |
25 | #include <linux/fs.h> | |
26 | int readdir(struct file *filp, void *entry, filldir_t func) | |
27 | { return 0; } | |
28 | ||
29 | static const struct file_operations fops | |
30 | __attribute__ ((unused)) = { | |
31 | .readdir = readdir, | |
32 | }; | |
33 | ],[ | |
34 | ],[ | |
35 | AC_MSG_RESULT(yes) | |
36 | AC_DEFINE(HAVE_VFS_READDIR, 1, | |
37 | [fops->readdir() is available]) | |
38 | ],[ | |
39 | AC_MSG_ERROR(no; file a bug report with ZFSOnLinux) | |
40 | ]) | |
41 | ||
42 | ]) | |
43 | ]) |