fwknop: init script improvements
[feed/packages.git] / kernel / exfat-nofuse / patches / 0002-4.18.patch.patch
1 From 4b9607d6fd4a35d9bb35527fae7aac23d848c0ce Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Tue, 8 Jan 2019 15:45:24 +0000
4 Subject: [PATCH 2/2] 4.18.patch
5
6 Imported from https://aur.archlinux.org/cgit/aur.git/plain/4.18.patch?h=exfat-dkms-git
7 ---
8 exfat_super.c | 10 ++++++++++
9 1 file changed, 10 insertions(+)
10
11 diff --git a/exfat_super.c b/exfat_super.c
12 index 312de36..3ac18b0 100644
13 --- a/exfat_super.c
14 +++ b/exfat_super.c
15 @@ -147,8 +147,13 @@ static time_t accum_days_in_year[] = {
16 static void _exfat_truncate(struct inode *inode, loff_t old_size);
17
18 /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
20 +void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec64 *ts,
21 + DATE_TIME_T *tp)
22 +#else
23 void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
24 DATE_TIME_T *tp)
25 +#endif
26 {
27 time_t year = tp->Year;
28 time_t ld;
29 @@ -166,8 +171,13 @@ void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
30 }
31
32 /* Convert linear UNIX date to a FAT time/date pair. */
33 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
34 +void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec64 *ts,
35 + DATE_TIME_T *tp)
36 +#else
37 void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec *ts,
38 DATE_TIME_T *tp)
39 +#endif
40 {
41 time_t second = ts->tv_sec;
42 time_t day, month, year;