linux: implement filesystem-side copy/clone functions for EL7
[zfs.git] / config / kernel-zero_page.m4
blob1461781acb416515a09cd68b88529018355699d7
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 #
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])
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         ])