]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-bio_set_dev.m4
Merge branch 'zfsonlinux/merge-spl'
[FreeBSD/FreeBSD.git] / config / kernel-bio_set_dev.m4
1 dnl #
2 dnl # Linux 4.14 API,
3 dnl #
4 dnl # The bio_set_dev() helper was introduced as part of the transition
5 dnl # to have struct gendisk in struct bio. 
6 dnl #
7 AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
8         AC_MSG_CHECKING([whether bio_set_dev() exists])
9         ZFS_LINUX_TRY_COMPILE([
10                 #include <linux/bio.h>
11                 #include <linux/fs.h>
12         ],[
13                 struct block_device *bdev = NULL;
14                 struct bio *bio = NULL;
15                 bio_set_dev(bio, bdev);
16         ],[
17                 AC_MSG_RESULT(yes)
18                 AC_DEFINE(HAVE_BIO_SET_DEV, 1, [bio_set_dev() exists])
19         ],[
20                 AC_MSG_RESULT(no)
21         ])
22 ])