|
22 | 22 |
|
23 | 23 | #define EXFAT_CLUSTERS_UNTRACKED (~0u) |
24 | 24 |
|
| 25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) |
| 26 | +typedef struct timespec64 exfat_timespec_t; |
| 27 | +#else |
| 28 | +typedef struct timespec exfat_timespec_t; |
| 29 | +#endif |
| 30 | + |
25 | 31 | /* |
26 | 32 | * exfat error flags |
27 | 33 | */ |
@@ -190,9 +196,9 @@ struct exfat_dir_entry { |
190 | 196 | unsigned short attr; |
191 | 197 | loff_t size; |
192 | 198 | unsigned int num_subdirs; |
193 | | - struct timespec64 atime; |
194 | | - struct timespec64 mtime; |
195 | | - struct timespec64 crtime; |
| 199 | + exfat_timespec_t atime; |
| 200 | + exfat_timespec_t mtime; |
| 201 | + exfat_timespec_t crtime; |
196 | 202 | struct exfat_dentry_namebuf namebuf; |
197 | 203 | }; |
198 | 204 |
|
@@ -303,7 +309,7 @@ struct exfat_inode_info { |
303 | 309 | struct rw_semaphore truncate_lock; |
304 | 310 | struct inode vfs_inode; |
305 | 311 | /* File creation time */ |
306 | | - struct timespec64 i_crtime; |
| 312 | + exfat_timespec_t i_crtime; |
307 | 313 | }; |
308 | 314 |
|
309 | 315 | static inline struct exfat_sb_info *EXFAT_SB(struct super_block *sb) |
@@ -530,10 +536,10 @@ void exfat_msg(struct super_block *sb, const char *lv, const char *fmt, ...) |
530 | 536 | #define exfat_info(sb, fmt, ...) \ |
531 | 537 | exfat_msg(sb, KERN_INFO, fmt, ##__VA_ARGS__) |
532 | 538 |
|
533 | | -void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, |
| 539 | +void exfat_get_entry_time(struct exfat_sb_info *sbi, exfat_timespec_t *ts, |
534 | 540 | u8 tz, __le16 time, __le16 date, u8 time_cs); |
535 | | -void exfat_truncate_atime(struct timespec64 *ts); |
536 | | -void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, |
| 541 | +void exfat_truncate_atime(exfat_timespec_t *ts); |
| 542 | +void exfat_set_entry_time(struct exfat_sb_info *sbi, exfat_timespec_t *ts, |
537 | 543 | u8 *tz, __le16 *time, __le16 *date, u8 *time_cs); |
538 | 544 | u16 exfat_calc_chksum16(void *data, int len, u16 chksum, int type); |
539 | 545 | u32 exfat_calc_chksum32(void *data, int len, u32 chksum, int type); |
|
0 commit comments