]>
Commit | Line | Data |
---|---|---|
2946a1a1 BB |
1 | dnl # |
2 | dnl # 4.9, current_time() added | |
6413c95f | 3 | dnl # 4.18, return type changed from timespec to timespec64 |
2946a1a1 | 4 | dnl # |
00f40961 RN |
5 | dnl # Note that we don't care about the return type in this check. If we have |
6 | dnl # to implement a fallback, we'll know we're <4.9, which was timespec. | |
7 | dnl # | |
608f8749 BB |
8 | AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [ |
9 | ZFS_LINUX_TEST_SRC([current_time], [ | |
2946a1a1 BB |
10 | #include <linux/fs.h> |
11 | ], [ | |
6413c95f | 12 | struct inode ip __attribute__ ((unused)); |
00f40961 | 13 | (void) current_time(&ip); |
608f8749 BB |
14 | ]) |
15 | ]) | |
16 | ||
17 | AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME], [ | |
18 | AC_MSG_CHECKING([whether current_time() exists]) | |
19 | ZFS_LINUX_TEST_RESULT_SYMBOL([current_time], | |
20 | [current_time], [fs/inode.c], [ | |
2946a1a1 BB |
21 | AC_MSG_RESULT(yes) |
22 | AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists]) | |
23 | ], [ | |
24 | AC_MSG_RESULT(no) | |
25 | ]) | |
26 | ]) |