]>
Commit | Line | Data |
---|---|---|
34ee731f AX |
1 | dnl # |
2 | dnl # 3.9 API change | |
3 | dnl # set_fs_pwd takes const struct path * | |
4 | dnl # | |
5 | AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], | |
6 | tmp_flags="$EXTRA_KCFLAGS" | |
7 | EXTRA_KCFLAGS="-Werror" | |
8 | [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) | |
9 | SPL_LINUX_TRY_COMPILE([ | |
10 | #include <linux/spinlock.h> | |
11 | #include <linux/fs_struct.h> | |
12 | #include <linux/path.h> | |
13 | void (*const set_fs_pwd_func) | |
14 | (struct fs_struct *, const struct path *) | |
15 | = set_fs_pwd; | |
16 | ],[ | |
17 | return 0; | |
18 | ],[ | |
19 | AC_MSG_RESULT(yes) | |
20 | AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1, | |
21 | [set_fs_pwd() needs const path *]) | |
22 | ],[ | |
23 | SPL_LINUX_TRY_COMPILE([ | |
24 | #include <linux/spinlock.h> | |
25 | #include <linux/fs_struct.h> | |
26 | #include <linux/path.h> | |
27 | void (*const set_fs_pwd_func) | |
28 | (struct fs_struct *, struct path *) | |
29 | = set_fs_pwd; | |
30 | ],[ | |
31 | return 0; | |
32 | ],[ | |
33 | AC_MSG_RESULT(no) | |
34 | ],[ | |
35 | AC_MSG_ERROR(unknown) | |
36 | ]) | |
37 | ]) | |
38 | EXTRA_KCFLAGS="$tmp_flags" | |
39 | ]) |