4 AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
5 AC_MSG_CHECKING([block device operation prototypes])
6 ZFS_LINUX_TRY_COMPILE([
7 #include <linux/blkdev.h>
9 int (*blk_open) (struct block_device *, fmode_t) = NULL;
10 int (*blk_release) (struct gendisk *, fmode_t) = NULL;
11 int (*blk_ioctl) (struct block_device *, fmode_t,
12 unsigned, unsigned long) = NULL;
13 int (*blk_compat_ioctl) (struct block_device *, fmode_t,
14 unsigned, unsigned long) = NULL;
15 struct block_device_operations blk_ops = {
17 .release = blk_release,
19 .compat_ioctl = blk_compat_ioctl,
22 blk_ops.open(NULL, 0);
23 blk_ops.release(NULL, 0);
24 blk_ops.ioctl(NULL, 0, 0, 0);
25 blk_ops.compat_ioctl(NULL, 0, 0, 0);
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)