1dnl #
2dnl # 4.9, current_time() added
3dnl # 4.18, return type changed from timespec to timespec64
4dnl #
5dnl # Note that we don't care about the return type in this check. If we have
6dnl # to implement a fallback, we'll know we're <4.9, which was timespec.
7dnl #
8AC_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
17AC_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])
27