]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-bdev-block-device-operations.m4
Remove not needed .pc directory
[mirror_zfs-debian.git] / config / kernel-bdev-block-device-operations.m4
CommitLineData
c9c0d073
BB
1dnl #
2dnl # 2.6.x API change
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
5 AC_MSG_CHECKING([block device operation prototypes])
b9c59ec8 6 tmp_flags="$EXTRA_KCFLAGS"
e191b54e 7 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
c9c0d073
BB
8 ZFS_LINUX_TRY_COMPILE([
9 #include <linux/blkdev.h>
c38367c7
RY
10
11 int blk_open(struct block_device *bdev, fmode_t mode)
12 { return 0; }
c38367c7
RY
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)) = {
c9c0d073 20 .open = blk_open,
c06d4368 21 .release = NULL,
c9c0d073
BB
22 .ioctl = blk_ioctl,
23 .compat_ioctl = blk_compat_ioctl,
24 };
c38367c7 25 ],[
c9c0d073
BB
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 ])
b9c59ec8 33 EXTRA_KCFLAGS="$tmp_flags"
c9c0d073 34])