]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-bio_max_segs.m4
ztest: use ASSERT3P to compare pointers
[FreeBSD/FreeBSD.git] / config / kernel-bio_max_segs.m4
1 dnl #
2 dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs()
3 dnl # which will handle the logic of setting the upper-bound to a
4 dnl # BIO_MAX_PAGES, internally.
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS], [
7         ZFS_LINUX_TEST_SRC([bio_max_segs], [
8                 #include <linux/bio.h>
9         ],[
10                 bio_max_segs(1);
11         ])
12 ])
13
14 AC_DEFUN([ZFS_AC_KERNEL_BIO_MAX_SEGS], [
15         AC_MSG_CHECKING([whether bio_max_segs() exists])
16         ZFS_LINUX_TEST_RESULT([bio_max_segs], [
17                 AC_MSG_RESULT(yes)
18
19                 AC_DEFINE([HAVE_BIO_MAX_SEGS], 1, [bio_max_segs() is implemented])
20         ],[
21                 AC_MSG_RESULT(no)
22         ])
23 ])