Fix gcc configure warnings
[zfs.git] / config / kernel-bdev-logical-size.m4
1 dnl #
2 dnl # 2.6.30 API change
3 dnl # bdev_hardsect_size() replaced with bdev_logical_block_size().  While
4 dnl # it has been true for a while that there was no strict 1:1 mapping
5 dnl # between physical sector size and logical block size this change makes
6 dnl # it explicit.
7 dnl #
8 AC_DEFUN([ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE], [
9         AC_MSG_CHECKING([whether bdev_logical_block_size() is available])
10         ZFS_LINUX_TRY_COMPILE([
11                 #include <linux/blkdev.h>
12         ],[
13                 struct block_device *bdev = NULL;
14                 bdev_logical_block_size(bdev);
15         ],[
16                 AC_MSG_RESULT(yes)
17                 AC_DEFINE(HAVE_BDEV_LOGICAL_BLOCK_SIZE, 1,
18                           [bdev_logical_block_size() is available])
19         ],[
20                 AC_MSG_RESULT(no)
21         ])
22 ])