]> granicus.if.org Git - zfs/blob - config/kernel-inode-times.m4
zfs-import: should be before swap
[zfs] / config / kernel-inode-times.m4
1 dnl #
2 dnl # 4.18 API change
3 dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
6         AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
7         tmp_flags="$EXTRA_KCFLAGS"
8         EXTRA_KCFLAGS="-Werror"
9         ZFS_LINUX_TRY_COMPILE([
10                 #include <linux/fs.h>
11         ],[
12                 struct inode ip;
13                 struct timespec ts;
14
15                 memset(&ip, 0, sizeof(ip));
16                 ts = ip.i_mtime;
17         ],[
18                 AC_MSG_RESULT(no)
19         ],[
20                 AC_MSG_RESULT(yes)
21                 AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
22                     [inode->i_*time's are timespec64])
23         ])
24         EXTRA_KCFLAGS="$tmp_flags"
25 ])