Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:kernel:lts:4.14
exfat-kmp
0003-timespec-timespec64-for-Linux-4.18.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-timespec-timespec64-for-Linux-4.18.patch of Package exfat-kmp
From 5a8157163a16281cad0cd5444abec48ebf61220d Mon Sep 17 00:00:00 2001 From: Led <ledest@gmail.com> Date: Sat, 9 Mar 2019 23:54:26 +0200 Subject: [PATCH] timespec -> timespec64 for Linux >= 4.18 --- exfat_oal.c | 10 ++++++---- exfat_super.c | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/exfat_oal.c b/exfat_oal.c index 7435442..a9d98d3 100644 --- a/exfat_oal.c +++ b/exfat_oal.c @@ -128,13 +128,15 @@ static time_t accum_days_in_year[] = { TIMESTAMP_T *tm_current(TIMESTAMP_T *tp) { - struct timespec ts; time_t second, day, leap_day, month, year; - #if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0) - ts = CURRENT_TIME_SEC; -#else + struct timespec ts = CURRENT_TIME_SEC; +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0) + struct timespec ts; ktime_get_real_ts(&ts); +#else + struct timespec64 ts; + ktime_get_real_ts64(&ts); #endif second = ts.tv_sec; diff --git a/exfat_super.c b/exfat_super.c index 312de36..b9d37a2 100644 --- a/exfat_super.c +++ b/exfat_super.c @@ -147,8 +147,13 @@ static time_t accum_days_in_year[] = { static void _exfat_truncate(struct inode *inode, loff_t old_size); /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */ -void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts, - DATE_TIME_T *tp) +void exfat_time_fat2unix(struct exfat_sb_info *sbi, +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0) + struct timespec *ts, +#else + struct timespec64 *ts, +#endif + DATE_TIME_T *tp) { time_t year = tp->Year; time_t ld; @@ -166,8 +171,13 @@ void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts, } /* Convert linear UNIX date to a FAT time/date pair. */ -void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec *ts, - DATE_TIME_T *tp) +void exfat_time_unix2fat(struct exfat_sb_info *sbi, +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0) + struct timespec *ts, +#else + struct timespec64 *ts, +#endif + DATE_TIME_T *tp) { time_t second = ts->tv_sec; time_t day, month, year; -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor