]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-current-time.m4
ztest: use ASSERT3P to compare pointers
[FreeBSD/FreeBSD.git] / config / kernel-current-time.m4
1 dnl #
2 dnl # 4.9, current_time() added
3 dnl # 4.18, return type changed from timespec to timespec64
4 dnl #
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 #
8 AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
9         ZFS_LINUX_TEST_SRC([current_time], [
10                 #include <linux/fs.h>
11         ], [
12                 struct inode ip __attribute__ ((unused));
13                 (void) current_time(&ip);
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], [
21                 AC_MSG_RESULT(yes)
22                 AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
23         ], [
24                 AC_MSG_RESULT(no)
25         ])
26 ])