2018-03-05 23:44:35 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 4.16 API change
|
|
|
|
dnl # Verify if get_disk_and_module() symbol is available.
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_DISK_AND_MODULE], [
|
|
|
|
ZFS_LINUX_TEST_SRC([get_disk_and_module], [
|
2018-03-05 23:44:35 +03:00
|
|
|
#include <linux/genhd.h>
|
|
|
|
], [
|
|
|
|
struct gendisk *disk = NULL;
|
|
|
|
(void) get_disk_and_module(disk);
|
2019-10-01 22:50:34 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_AND_MODULE], [
|
|
|
|
AC_MSG_CHECKING([whether get_disk_and_module() is available])
|
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([get_disk_and_module],
|
|
|
|
[get_disk_and_module], [block/genhd.c], [
|
2018-03-05 23:44:35 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_GET_DISK_AND_MODULE,
|
|
|
|
1, [get_disk_and_module() is available])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|