]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-lookup-bdev.m4
Revert "Develop tests for issues #5866 and #8858"
[FreeBSD/FreeBSD.git] / config / kernel-lookup-bdev.m4
1 dnl #
2 dnl # 2.6.27, lookup_bdev() was exported.
3 dnl # 4.4.0-6.21 - x.y on Ubuntu, lookup_bdev() takes 2 arguments.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_BDEV],
6         [AC_MSG_CHECKING([whether lookup_bdev() wants 1 arg])
7         ZFS_LINUX_TRY_COMPILE_SYMBOL([
8                 #include <linux/fs.h>
9         ], [
10                 lookup_bdev(NULL);
11         ], [lookup_bdev], [fs/block_dev.c], [
12                 AC_MSG_RESULT(yes)
13                 AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1, [lookup_bdev() wants 1 arg])
14         ], [
15                 AC_MSG_RESULT(no)
16                 AC_MSG_CHECKING([whether lookup_bdev() wants 2 args])
17                 ZFS_LINUX_TRY_COMPILE_SYMBOL([
18                         #include <linux/fs.h>
19                 ], [
20                         lookup_bdev(NULL, FMODE_READ);
21                 ], [lookup_bdev], [fs/block_dev.c], [
22                         AC_MSG_RESULT(yes)
23                         AC_DEFINE(HAVE_2ARGS_LOOKUP_BDEV, 1,
24                             [lookup_bdev() wants 2 args])
25                 ], [
26                         AC_MSG_RESULT(no)
27                 ])
28         ])
29 ])