]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-current-time.m4
FreeBSD: Add zfs_link_create() error handling
[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 #
00f40961
RN
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 #
608f8749
BB
8AC_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
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], [
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])