summaryrefslogtreecommitdiffstats
path: root/src/ntfs_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-06-30 09:13:45 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-06-30 09:13:45 +0200
commitef199744f740c3ab07289390e4f21b3f80e3d757 (patch)
tree6610be8c08a5221d037f1a09c10275d35895db3f /src/ntfs_dir.c
parent41e13c70752a71479eecfb79010cd8ccc5575f9c (diff)
Fix ntfsprogs support when using mingw compiler
Diffstat (limited to 'src/ntfs_dir.c')
-rw-r--r--src/ntfs_dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c
index c7b6d3a..08a2c97 100644
--- a/src/ntfs_dir.c
+++ b/src/ntfs_dir.c
@@ -259,6 +259,7 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
#ifdef DJGPP
new_file->file_size=filesize;
#endif
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
new_file->stat.st_blksize=DEFAULT_SECTOR_SIZE;
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
if(new_file->stat.st_blksize!=0)
@@ -266,6 +267,7 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
new_file->stat.st_blocks=(filesize + new_file->stat.st_blksize - 1) / new_file->stat.st_blksize;
}
#endif
+#endif
new_file->stat.st_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
new_file->stat.st_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
new_file->stat.st_ctime=td_ntfs2utc(sle64_to_cpu(si->creation_time));