]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-blk-end-request.m4
Linux compat 2.6.39: mount_nodev()
[mirror_zfs-debian.git] / config / kernel-blk-end-request.m4
CommitLineData
c9c0d073
BB
1dnl #
2dnl # 2.6.31 API change
3dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
4dnl # changed in 2.6.31 so it may be used by non-GPL modules.
5dnl #
6AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
7 AC_MSG_CHECKING([whether blk_end_request() is available])
8 ZFS_LINUX_TRY_COMPILE([
9 #include <linux/blkdev.h>
10 ],[
11 struct request *req = NULL;
12 (void) blk_end_request(req, 0, 0);
13 ],[
14 AC_MSG_RESULT(yes)
15 AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
16 [blk_end_request() is available])
17 ],[
18 AC_MSG_RESULT(no)
19 ])
20
21 AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
22 ZFS_LINUX_TRY_COMPILE([
23 #include <linux/module.h>
24 #include <linux/blkdev.h>
25
26 MODULE_LICENSE("CDDL");
27 ],[
28 struct request *req = NULL;
29 (void) blk_end_request(req, 0, 0);
30 ],[
31 AC_MSG_RESULT(no)
32 ],[
33 AC_MSG_RESULT(yes)
34 AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
35 [blk_end_request() is GPL-only])
36 ])
37])