]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-current-time.m4
Linux 5.20 compat: blk_cleanup_disk()
[mirror_zfs.git] / config / kernel-current-time.m4
CommitLineData
2946a1a1
BB
1dnl #
2dnl # 4.9, current_time() added
6413c95f 3dnl # 4.18, return type changed from timespec to timespec64
2946a1a1 4dnl #
608f8749
BB
5AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
6 ZFS_LINUX_TEST_SRC([current_time], [
2946a1a1
BB
7 #include <linux/fs.h>
8 ], [
6413c95f
BB
9 struct inode ip __attribute__ ((unused));
10 ip.i_atime = current_time(&ip);
608f8749
BB
11 ])
12])
13
14AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME], [
15 AC_MSG_CHECKING([whether current_time() exists])
16 ZFS_LINUX_TEST_RESULT_SYMBOL([current_time],
17 [current_time], [fs/inode.c], [
2946a1a1
BB
18 AC_MSG_RESULT(yes)
19 AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
20 ], [
21 AC_MSG_RESULT(no)
22 ])
23])