2 dnl # 2.6.31 API change
3 dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
4 dnl # changed in 2.6.31 so it may be used by non-GPL modules.
6 AC_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>
11 struct request *req = NULL;
12 (void) blk_end_request(req, 0, 0);
15 AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
16 [blk_end_request() is available])
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>
26 MODULE_LICENSE("CDDL");
28 struct request *req = NULL;
29 (void) blk_end_request(req, 0, 0);
34 AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
35 [blk_end_request() is GPL-only])