]>
Commit | Line | Data |
---|---|---|
608f8749 | 1 | AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [ |
795699a6 BB |
2 | |
3 | dnl # | |
4 | dnl # 5.6 API change | |
5 | dnl # timespec64_trunc() replaced by timestamp_truncate() interface. | |
6 | dnl # | |
7 | ZFS_LINUX_TEST_SRC([timestamp_truncate], [ | |
8 | #include <linux/fs.h> | |
9 | ],[ | |
10 | struct timespec64 ts; | |
11 | struct inode ip; | |
12 | ||
3e5d41d8 | 13 | memset(&ts, 0, sizeof(ts)); |
795699a6 BB |
14 | ts = timestamp_truncate(ts, &ip); |
15 | ]) | |
16 | ||
17 | dnl # | |
18 | dnl # 4.18 API change | |
19 | dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64. | |
20 | dnl # | |
608f8749 | 21 | ZFS_LINUX_TEST_SRC([inode_times], [ |
6413c95f BB |
22 | #include <linux/fs.h> |
23 | ],[ | |
24 | struct inode ip; | |
25 | struct timespec ts; | |
26 | ||
27 | memset(&ip, 0, sizeof(ip)); | |
28 | ts = ip.i_mtime; | |
608f8749 BB |
29 | ]) |
30 | ]) | |
31 | ||
32 | AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [ | |
795699a6 BB |
33 | AC_MSG_CHECKING([whether timestamp_truncate() exists]) |
34 | ZFS_LINUX_TEST_RESULT([timestamp_truncate], [ | |
35 | AC_MSG_RESULT(yes) | |
36 | AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1, | |
37 | [timestamp_truncate() exists]) | |
38 | ],[ | |
39 | AC_MSG_RESULT(no) | |
40 | ]) | |
41 | ||
608f8749 BB |
42 | AC_MSG_CHECKING([whether inode->i_*time's are timespec64]) |
43 | ZFS_LINUX_TEST_RESULT([inode_times], [ | |
6413c95f BB |
44 | AC_MSG_RESULT(no) |
45 | ],[ | |
46 | AC_MSG_RESULT(yes) | |
47 | AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1, | |
48 | [inode->i_*time's are timespec64]) | |
49 | ]) | |
6413c95f | 50 | ]) |