Fix memory leak in zfs_setprocinit code
[zfs.git] / config / kernel-ktime.m4
blob64c3b5f90328eadcb41a59c182c36ffe0dd3ab15
1 dnl #
2 dnl # 4.18: ktime_get_coarse_real_ts64() replaces current_kernel_time64().
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [
5         ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [
6                 #include <linux/mm.h>
7         ], [
8                 struct timespec64 ts;
9                 ktime_get_coarse_real_ts64(&ts);
10         ])
13 AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [
14         AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists])
15         ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [
16                 AC_MSG_RESULT(yes)
17                 AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1,
18                     [ktime_get_coarse_real_ts64() exists])
19         ], [
20                 AC_MSG_RESULT(no)
21         ])
24 dnl #
25 dnl # 4.18: ktime_get_raw_ts64() replaces getrawmonotonic64().
26 dnl #
27 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64], [
28         ZFS_LINUX_TEST_SRC([ktime_get_raw_ts64], [
29                 #include <linux/mm.h>
30         ], [
31                 struct timespec64 ts;
32                 ktime_get_raw_ts64(&ts);
33         ])
36 AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_RAW_TS64], [
37         AC_MSG_CHECKING([whether ktime_get_raw_ts64() exists])
38         ZFS_LINUX_TEST_RESULT([ktime_get_raw_ts64], [
39                 AC_MSG_RESULT(yes)
40                 AC_DEFINE(HAVE_KTIME_GET_RAW_TS64, 1,
41                     [ktime_get_raw_ts64() exists])
42         ], [
43                 AC_MSG_RESULT(no)
44         ])
47 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME], [
48         ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64
49         ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64
52 AC_DEFUN([ZFS_AC_KERNEL_KTIME], [
53         ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64
54         ZFS_AC_KERNEL_KTIME_GET_RAW_TS64