]> git.proxmox.com Git - mirror_zfs.git/blob - config/kernel-copy-from-user-inatomic.m4
removal of LegacyVersion broke ax_python_dev.m4
[mirror_zfs.git] / config / kernel-copy-from-user-inatomic.m4
1 dnl #
2 dnl # On certain architectures `__copy_from_user_inatomic`
3 dnl # is a GPL exported variable and cannot be used by OpenZFS.
4 dnl #
5
6 dnl #
7 dnl # Checking if `__copy_from_user_inatomic` is available.
8 dnl #
9 AC_DEFUN([ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC], [
10 ZFS_LINUX_TEST_SRC([__copy_from_user_inatomic], [
11 #include <linux/uaccess.h>
12 ], [
13 int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0);
14 ], [], [ZFS_META_LICENSE])
15 ])
16
17 AC_DEFUN([ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC], [
18 AC_MSG_CHECKING([whether __copy_from_user_inatomic is available])
19 ZFS_LINUX_TEST_RESULT([__copy_from_user_inatomic_license], [
20 AC_MSG_RESULT(yes)
21 ], [
22 AC_MSG_RESULT(no)
23 AC_MSG_ERROR([
24 *** The `__copy_from_user_inatomic()` Linux kernel function is
25 *** incompatible with the CDDL license and will prevent the module
26 *** linking stage from succeeding. OpenZFS cannot be compiled.
27 ])
28 ])
29 ])