You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

  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. Imported from https://aur.archlinux.org/cgit/aur.git/plain/4.18.patch?h=exfat-dkms-git
  6. ---
  7. exfat_super.c | 10 ++++++++++
  8. 1 file changed, 10 insertions(+)
  9. diff --git a/exfat_super.c b/exfat_super.c
  10. index 312de36..3ac18b0 100644
  11. --- a/exfat_super.c
  12. +++ b/exfat_super.c
  13. @@ -147,8 +147,13 @@ static time_t accum_days_in_year[] = {
  14. static void _exfat_truncate(struct inode *inode, loff_t old_size);
  15. /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */
  16. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
  17. +void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec64 *ts,
  18. + DATE_TIME_T *tp)
  19. +#else
  20. void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
  21. DATE_TIME_T *tp)
  22. +#endif
  23. {
  24. time_t year = tp->Year;
  25. time_t ld;
  26. @@ -166,8 +171,13 @@ void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
  27. }
  28. /* Convert linear UNIX date to a FAT time/date pair. */
  29. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,01)
  30. +void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec64 *ts,
  31. + DATE_TIME_T *tp)
  32. +#else
  33. void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec *ts,
  34. DATE_TIME_T *tp)
  35. +#endif
  36. {
  37. time_t second = ts->tv_sec;
  38. time_t day, month, year;