OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
[zfs.git] / config / kernel-get-disk-ro.m4
blob13ed81217ee3ea472efbc1e237e59dcd039483d7
1 dnl #
2 dnl # 2.6.x API change
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
5         AC_MSG_CHECKING([whether get_disk_ro() is available])
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                 struct gendisk *disk = NULL;
12                 (void) get_disk_ro(disk);
13         ],[
14                 AC_MSG_RESULT(yes)
15                 AC_DEFINE(HAVE_GET_DISK_RO, 1,
16                           [blk_disk_ro() is available])
17         ],[
18                 AC_MSG_RESULT(no)
19         ])
20         EXTRA_KCFLAGS="$tmp_flags"