Skip to content

Commit 2314f3c

Browse files
Matthieu CASTETnamjaejeon
authored andcommitted
exfat: fix build on old 32 bits system
For kernel less than 4.19.0, the max supported date is 2038 for 32/64 bits. This should fix : In file included from fs/exfat/misc.c:14: fs/exfat/misc.c: In function 'exfat_set_entry_time': fs/exfat/exfat_raw.h:166:37: error: overflow in conversion from 'long long int' to '__kernel_time_t' {aka 'long int'} changes value from '4354819199' to '59851903' [-Werror=overflow] 166 | #define EXFAT_MAX_TIMESTAMP_SECS 4354819199LL | ^~~~~~~~~~~~ fs/exfat/misc.c:135:16: note: in expansion of macro 'EXFAT_MAX_TIMESTAMP_SECS' 135 | ts->tv_sec = EXFAT_MAX_TIMESTAMP_SECS; | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors scripts/Makefile.build:258: recipe for target 'fs/exfat/misc.o' failed Signed-off-by: Matthieu CASTET <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent a52427b commit 2314f3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

misc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec *ts,
119119
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
120120
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs)
121121
#else
122+
#undef EXFAT_MAX_TIMESTAMP_SECS
123+
#define EXFAT_MAX_TIMESTAMP_SECS 0xffffffff
122124
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec *ts,
123125
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs)
124126
#endif

0 commit comments

Comments
 (0)