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 tmp_flags="$EXTRA_KCFLAGS"
9 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/blkdev.h>
13 struct request *req = NULL;
14 (void) blk_end_request(req, 0, 0);
17 AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
18 [blk_end_request() is available])
23 AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
24 ZFS_LINUX_TRY_COMPILE([
25 #include <linux/module.h>
26 #include <linux/blkdev.h>
28 MODULE_LICENSE("CDDL");
30 struct request *req = NULL;
31 (void) blk_end_request(req, 0, 0);
36 AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
37 [blk_end_request() is GPL-only])
39 EXTRA_KCFLAGS="$tmp_flags"