aboutsummaryrefslogtreecommitdiff
path: root/src/alf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alf.c')
-rw-r--r--src/alf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/alf.c b/src/alf.c
index c3b210d..d03ece7 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -125,9 +125,15 @@ void atarify_filename(char *result) {
*p = toupper(*p);
}
+#if defined(__MINGW32__) || defined(__MINGW64__)
+#define MOD_TIME st_mtime
+#else
+#define MOD_TIME st_mtim.tv_sec
+#endif
+
/* see Arcinfo for the gory details. */
unsigned long get_msdos_date_time(void) {
- time_t t = in_file_stat.st_mtim.tv_sec;
+ time_t t = in_file_stat.MOD_TIME;
struct tm *tm;
int msdos_year;
u16 ms_date, ms_time;