File: kernel-copy-from-user-inatomic.m4

package info (click to toggle)
zfs-linux 2.3.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: sid, trixie
  • size: 71,496 kB
  • sloc: ansic: 392,648; sh: 67,208; asm: 47,693; python: 8,160; makefile: 5,100; perl: 839; sed: 41
file content (29 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dnl #
dnl # On certain architectures `__copy_from_user_inatomic`
dnl # is a GPL exported variable and cannot be used by OpenZFS.
dnl #

dnl #
dnl # Checking if `__copy_from_user_inatomic` is available.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC], [
	ZFS_LINUX_TEST_SRC([__copy_from_user_inatomic], [
		#include <linux/uaccess.h>
	], [
		int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0);
	], [], [ZFS_META_LICENSE])
])

AC_DEFUN([ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC], [
	AC_MSG_CHECKING([whether __copy_from_user_inatomic is available])
	ZFS_LINUX_TEST_RESULT([__copy_from_user_inatomic_license], [
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
		AC_MSG_ERROR([
	*** The `__copy_from_user_inatomic()` Linux kernel function is
	*** incompatible with the CDDL license and will prevent the module
	*** linking stage from succeeding.  OpenZFS cannot be compiled.
		])
	])
])