forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exfat-nofuse: fix compile error on kernel 4.18+
Source: dorimanx/exfat-nofuse#137 Signed-off-by: Deng Qingfang <[email protected]>
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
kernel/exfat-nofuse/patches/000-fix-compile-on-kernel-4.18.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/exfat_super.c b/exfat_super.c | ||
index 312de36..79ff5f9 100644 | ||
--- a/exfat_super.c | ||
+++ b/exfat_super.c | ||
@@ -102,6 +102,12 @@ extern struct timezone sys_tz; | ||
#define current_time(x) (CURRENT_TIME_SEC) | ||
#endif | ||
|
||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) | ||
+#define timespec_compat timespec64 | ||
+#else | ||
+#define timespec_compat timespec | ||
+#endif | ||
+ | ||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) | ||
#define USE_NEW_IVERSION_API | ||
#define INC_IVERSION(x) (inode_inc_iversion(x)) | ||
@@ -147,7 +153,7 @@ 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, | ||
+void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec_compat *ts, | ||
DATE_TIME_T *tp) | ||
{ | ||
time_t year = tp->Year; | ||
@@ -166,7 +172,7 @@ 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, | ||
+void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec_compat *ts, | ||
DATE_TIME_T *tp) | ||
{ | ||
time_t second = ts->tv_sec; |