]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - zfs/config/kernel-bio_set_dev.m4
UBUNTU: [Packaging] dkms -- build zfs/spl packages
[mirror_ubuntu-bionic-kernel.git] / zfs / config / kernel-bio_set_dev.m4
CommitLineData
86e3c28a
CIK
1dnl #
2dnl # Linux 4.14 API,
3dnl #
4dnl # The bio_set_dev() helper was introduced as part of the transition
5dnl # to have struct gendisk in struct bio.
6dnl #
7AC_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])