2022-01-14 13:08:33 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 5.16 API change
|
|
|
|
dnl # add_disk grew a must-check return code
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_ADD_DISK], [
|
|
|
|
ZFS_LINUX_TEST_SRC([add_disk_ret], [
|
2022-03-24 18:33:40 +03:00
|
|
|
#include <linux/blkdev.h>
|
2022-01-14 13:08:33 +03:00
|
|
|
], [
|
|
|
|
struct gendisk *disk = NULL;
|
|
|
|
int err = add_disk(disk);
|
|
|
|
err = err;
|
|
|
|
])
|
|
|
|
])
|
2022-03-24 18:33:40 +03:00
|
|
|
|
2022-01-14 13:08:33 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_ADD_DISK], [
|
|
|
|
AC_MSG_CHECKING([whether add_disk() returns int])
|
|
|
|
ZFS_LINUX_TEST_RESULT([add_disk_ret],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_ADD_DISK_RET, 1,
|
|
|
|
[add_disk() returns int])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|