]> git.proxmox.com Git - mirror_zfs-debian.git/blob - config/kernel-bdev-block-device-operations.m4
Add dpkg-dev to Depends of zfs-dkms (Closes: #900714)
[mirror_zfs-debian.git] / config / kernel-bdev-block-device-operations.m4
1 dnl #
2 dnl # 2.6.x API change
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
5 AC_MSG_CHECKING([block device operation prototypes])
6 tmp_flags="$EXTRA_KCFLAGS"
7 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
8 ZFS_LINUX_TRY_COMPILE([
9 #include <linux/blkdev.h>
10
11 int blk_open(struct block_device *bdev, fmode_t mode)
12 { return 0; }
13 int blk_ioctl(struct block_device *bdev, fmode_t mode,
14 unsigned x, unsigned long y) { return 0; }
15 int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
16 unsigned x, unsigned long y) { return 0; }
17
18 static const struct block_device_operations
19 bops __attribute__ ((unused)) = {
20 .open = blk_open,
21 .release = NULL,
22 .ioctl = blk_ioctl,
23 .compat_ioctl = blk_compat_ioctl,
24 };
25 ],[
26 ],[
27 AC_MSG_RESULT(struct block_device)
28 AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
29 [struct block_device_operations use bdevs])
30 ],[
31 AC_MSG_RESULT(struct inode)
32 ])
33 EXTRA_KCFLAGS="$tmp_flags"
34 ])