]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-access-ok-type.m4
Improve error message for zfs create with @ or # in name
[mirror_zfs.git] / config / kernel-access-ok-type.m4
CommitLineData
77e50c30
TH
1dnl #
2dnl # Linux 5.0: access_ok() drops 'type' parameter:
3dnl #
4dnl # - access_ok(type, addr, size)
5dnl # + access_ok(addr, size)
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_ACCESS_OK_TYPE], [
8 AC_MSG_CHECKING([whether access_ok() has 'type' parameter])
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/uaccess.h>
11 ],[
12 const void __user __attribute__((unused)) *addr = (void *) 0xdeadbeef;
13 unsigned long __attribute__((unused)) size = 1;
14 int error __attribute__((unused)) = access_ok(0, addr, size);
15 ],[
16 AC_MSG_RESULT(yes)
17 AC_DEFINE(HAVE_ACCESS_OK_TYPE, 1, [kernel has access_ok with 'type' parameter])
18 ],[
19 AC_MSG_RESULT(no)
20 ])
21])