2 dnl # 2.6.29 API change
3 dnl # In the 2.6.29 kernel blk_rq_bytes() was available as a GPL-only symbol.
4 dnl # So we need to check the symbol license as well. As of 2.6.31 the
5 dnl blk_rq_bytes() helper was changed to a static inline which we can use.
7 AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_BYTES], [
8 AC_MSG_CHECKING([whether blk_rq_bytes() is available])
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/blkdev.h>
12 struct request *req = NULL;
13 (void) blk_rq_bytes(req);
16 AC_DEFINE(HAVE_BLK_RQ_BYTES, 1,
17 [blk_rq_bytes() is available])
22 AC_MSG_CHECKING([whether blk_rq_bytes() is GPL-only])
23 ZFS_LINUX_TRY_COMPILE([
24 #include <linux/module.h>
25 #include <linux/blkdev.h>
27 MODULE_LICENSE("CDDL");
29 struct request *req = NULL;
30 (void) blk_rq_bytes(req);
35 AC_DEFINE(HAVE_BLK_RQ_BYTES_GPL_ONLY, 1,
36 [blk_rq_bytes() is GPL-only])