aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/spl/sys/time.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h
index 37f5e35df..1a986c9b9 100644
--- a/include/spl/sys/time.h
+++ b/include/spl/sys/time.h
@@ -82,8 +82,11 @@ gethrestime(inode_timespec_t *ts)
static inline time_t
gethrestime_sec(void)
{
- struct timespec ts;
- ts = current_kernel_time();
+#if defined(HAVE_INODE_TIMESPEC64_TIMES)
+ inode_timespec_t ts = current_kernel_time64();
+#else
+ inode_timespec_t ts = current_kernel_time();
+#endif
return (ts.tv_sec);
}