1dnl # SPDX-License-Identifier: CDDL-1.0 2dnl # 3dnl # 6.6 API change, 4dnl # fsync_bdev was removed in favor of sync_blockdev 5dnl # 6AC_DEFUN([ZFS_AC_KERNEL_SRC_SYNC_BDEV], [ 7 ZFS_LINUX_TEST_SRC([fsync_bdev], [ 8 #include <linux/blkdev.h> 9 ],[ 10 fsync_bdev(NULL); 11 ]) 12 13 ZFS_LINUX_TEST_SRC([sync_blockdev], [ 14 #include <linux/blkdev.h> 15 ],[ 16 sync_blockdev(NULL); 17 ]) 18]) 19 20AC_DEFUN([ZFS_AC_KERNEL_SYNC_BDEV], [ 21 AC_MSG_CHECKING([whether fsync_bdev() exists]) 22 ZFS_LINUX_TEST_RESULT([fsync_bdev], [ 23 AC_MSG_RESULT(yes) 24 AC_DEFINE(HAVE_FSYNC_BDEV, 1, 25 [fsync_bdev() is declared in include/blkdev.h]) 26 ],[ 27 AC_MSG_CHECKING([whether sync_blockdev() exists]) 28 ZFS_LINUX_TEST_RESULT([sync_blockdev], [ 29 AC_MSG_RESULT(yes) 30 AC_DEFINE(HAVE_SYNC_BLOCKDEV, 1, 31 [sync_blockdev() is declared in include/blkdev.h]) 32 ],[ 33 ZFS_LINUX_TEST_ERROR( 34 [neither fsync_bdev() nor sync_blockdev() exist]) 35 ]) 36 ]) 37]) 38