]> git.proxmox.com Git - mirror_zfs.git/blob - config/kernel-zero_page.m4
Allow mounting snapshots in .zfs/snapshot as a regular user
[mirror_zfs.git] / config / kernel-zero_page.m4
1 dnl #
2 dnl # ZERO_PAGE() is an alias for emtpy_zero_page. On certain architectures
3 dnl # this is a GPL exported variable.
4 dnl #
5
6 dnl #
7 dnl # Checking if ZERO_PAGE is exported GPL-only
8 dnl #
9 AC_DEFUN([ZFS_AC_KERNEL_SRC_ZERO_PAGE], [
10 ZFS_LINUX_TEST_SRC([zero_page], [
11 #include <asm/pgtable.h>
12 ], [
13 struct page *p __attribute__ ((unused));
14 p = ZERO_PAGE(0);
15 ], [], [ZFS_META_LICENSE])
16 ])
17
18 AC_DEFUN([ZFS_AC_KERNEL_ZERO_PAGE], [
19 AC_MSG_CHECKING([whether ZERO_PAGE() is GPL-only])
20 ZFS_LINUX_TEST_RESULT([zero_page_license], [
21 AC_MSG_RESULT(no)
22 ], [
23 AC_MSG_RESULT(yes)
24 AC_DEFINE(HAVE_ZERO_PAGE_GPL_ONLY, 1,
25 [ZERO_PAGE() is GPL-only])
26 ])
27 ])