2017-05-10 19:30:48 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 4.9, current_time() added
|
2018-06-20 07:51:18 +03:00
|
|
|
dnl # 4.18, return type changed from timespec to timespec64
|
2017-05-10 19:30:48 +03:00
|
|
|
dnl #
|
2023-12-16 10:01:45 +03:00
|
|
|
dnl # Note that we don't care about the return type in this check. If we have
|
|
|
|
dnl # to implement a fallback, we'll know we're <4.9, which was timespec.
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
|
|
|
|
ZFS_LINUX_TEST_SRC([current_time], [
|
2017-05-10 19:30:48 +03:00
|
|
|
#include <linux/fs.h>
|
|
|
|
], [
|
2018-06-20 07:51:18 +03:00
|
|
|
struct inode ip __attribute__ ((unused));
|
2023-12-16 10:01:45 +03:00
|
|
|
(void) current_time(&ip);
|
2019-10-01 22:50:34 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME], [
|
|
|
|
AC_MSG_CHECKING([whether current_time() exists])
|
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([current_time],
|
|
|
|
[current_time], [fs/inode.c], [
|
2017-05-10 19:30:48 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|