4 AC_DEFUN([ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT], [
5 AC_MSG_CHECKING([whether rq_for_each_segment() is available])
6 tmp_flags="$EXTRA_KCFLAGS"
7 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
8 ZFS_LINUX_TRY_COMPILE([
9 #include <linux/blkdev.h>
12 struct req_iterator iter;
13 struct request *req = NULL;
14 rq_for_each_segment(bv, req, iter) { }
17 AC_DEFINE(HAVE_RQ_FOR_EACH_SEGMENT, 1,
18 [rq_for_each_segment() is available])
22 EXTRA_KCFLAGS="$tmp_flags"