mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Linux 4.20 compat: current_kernel_time()
Commit torvalds/linux@976516404 removed the current_kernel_time() function (and several others). All callers are expected to use current_kernel_time64(). Update the gethrestime_sec() wrapper accordingly. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8074
This commit is contained in:
parent
9042f6033a
commit
82c0a050fc
@ -82,8 +82,11 @@ gethrestime(inode_timespec_t *ts)
|
|||||||
static inline time_t
|
static inline time_t
|
||||||
gethrestime_sec(void)
|
gethrestime_sec(void)
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||||
ts = current_kernel_time();
|
inode_timespec_t ts = current_kernel_time64();
|
||||||
|
#else
|
||||||
|
inode_timespec_t ts = current_kernel_time();
|
||||||
|
#endif
|
||||||
return (ts.tv_sec);
|
return (ts.tv_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user