]>
Commit | Line | Data |
---|---|---|
77e50c30 TH |
1 | dnl # |
2 | dnl # Linux 5.0: access_ok() drops 'type' parameter: | |
3 | dnl # | |
4 | dnl # - access_ok(type, addr, size) | |
5 | dnl # + access_ok(addr, size) | |
6 | dnl # | |
7 | AC_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 | ]) |