diff options
author | Brian Behlendorf <[email protected]> | 2018-02-07 11:50:24 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2018-02-07 11:50:24 -0800 |
commit | 48ef8ba07094afcd67355940ca8db92d76f7c096 (patch) | |
tree | c0f847b7ce7c93950d313ca7708bce4bc1f3621e /config/kernel-set-fs-pwd.m4 | |
parent | 5461eefe50427a8f8caf0b92f0195c754bed8ec6 (diff) |
Split spl-build.m4
Split the kernel interface configure checks in to seperate m4
macro files. This is intended to facilitate moving the spl
source code in to the zfs repository.
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #682
Diffstat (limited to 'config/kernel-set-fs-pwd.m4')
-rw-r--r-- | config/kernel-set-fs-pwd.m4 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/config/kernel-set-fs-pwd.m4 b/config/kernel-set-fs-pwd.m4 new file mode 100644 index 000000000..849e7e6cb --- /dev/null +++ b/config/kernel-set-fs-pwd.m4 @@ -0,0 +1,39 @@ +dnl # +dnl # 3.9 API change +dnl # set_fs_pwd takes const struct path * +dnl # +AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST], + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *]) + SPL_LINUX_TRY_COMPILE([ + #include <linux/spinlock.h> + #include <linux/fs_struct.h> + #include <linux/path.h> + void (*const set_fs_pwd_func) + (struct fs_struct *, const struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1, + [set_fs_pwd() needs const path *]) + ],[ + SPL_LINUX_TRY_COMPILE([ + #include <linux/spinlock.h> + #include <linux/fs_struct.h> + #include <linux/path.h> + void (*const set_fs_pwd_func) + (struct fs_struct *, struct path *) + = set_fs_pwd; + ],[ + return 0; + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_ERROR(unknown) + ]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) |