Fix "file is executable, but no shebang" warnings
[zfs.git] / config / kernel-get-disk-and-module.m4
blob2a51a5af7dc1b47b57139fe272983b0ef389f2a0
1 dnl #
2 dnl # 4.16 API change
3 dnl # Verify if get_disk_and_module() symbol is available.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_AND_MODULE],
6         [AC_MSG_CHECKING([whether get_disk_and_module() is available])
7         ZFS_LINUX_TRY_COMPILE_SYMBOL([
8                 #include <linux/genhd.h>
9         ], [
10                 struct gendisk *disk = NULL;
11                 (void) get_disk_and_module(disk);
12         ], [get_disk_and_module], [block/genhd.c], [
13                 AC_MSG_RESULT(yes)
14                 AC_DEFINE(HAVE_GET_DISK_AND_MODULE,
15                     1, [get_disk_and_module() is available])
16         ], [
17                 AC_MSG_RESULT(no)
18         ])