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>
11 int blk_open(struct block_device *bdev, fmode_t mode)
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; }
18 static const struct block_device_operations
19 bops __attribute__ ((unused)) = {
23 .compat_ioctl = blk_compat_ioctl,
27 AC_MSG_RESULT(struct block_device)
28 AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
29 [struct block_device_operations use bdevs])
31 AC_MSG_RESULT(struct inode)
33 EXTRA_KCFLAGS="$tmp_flags"