xref: /freebsd/sys/contrib/openzfs/config/kernel-get-disk-ro.m4 (revision c03c5b1c80914ec656fbee84539355d1fad68bf9)
1dnl #
2dnl # 2.6.x API change
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_DISK_RO], [
5	ZFS_LINUX_TEST_SRC([get_disk_ro], [
6		#include <linux/blkdev.h>
7	],[
8		struct gendisk *disk __attribute__ ((unused)) = NULL;
9		(void) get_disk_ro(disk);
10	], [])
11])
12
13AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
14	AC_MSG_CHECKING([whether get_disk_ro() is available])
15	ZFS_LINUX_TEST_RESULT([get_disk_ro], [
16		AC_MSG_RESULT(yes)
17	],[
18		ZFS_LINUX_TEST_ERROR([get_disk_ro()])
19	])
20])
21