xref: /freebsd/sys/contrib/openzfs/config/kernel-file.m4 (revision 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717)
1dnl #
2dnl # 6.12 removed f_version from struct file
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE_F_VERSION], [
5	ZFS_LINUX_TEST_SRC([file_f_version], [
6		#include <linux/fs.h>
7
8		static const struct f __attribute__((unused)) = {
9			.f_version = 0;
10		};
11	])
12])
13
14AC_DEFUN([ZFS_AC_KERNEL_FILE_F_VERSION], [
15	AC_MSG_CHECKING([whether file->f_version exists])
16	ZFS_LINUX_TEST_RESULT([file_f_version], [
17		AC_MSG_RESULT(yes)
18		AC_DEFINE(HAVE_FILE_F_VERSION, 1,
19		    [file->f_version exists])
20	], [
21		AC_MSG_RESULT(no)
22	])
23])
24
25AC_DEFUN([ZFS_AC_KERNEL_FILE], [
26	ZFS_AC_KERNEL_FILE_F_VERSION
27])
28
29AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE], [
30	ZFS_AC_KERNEL_SRC_FILE_F_VERSION
31])
32