summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-04-21 19:42:44 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-04-21 19:42:44 +0200
commit791794a74fdaa10f1acc707b254161b23007ae26 (patch)
treeb8a5806b41a477c68d3d8519cd9db3d691f44b69 /src/dir.c
parentb555b3a4f62847a5e27173fc48548d5574fe37d1 (diff)
Workaround for Dos/DJGPP, stat.st_size seems to be 31 bits only.
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dir.c b/src/dir.c
index 25767de..276dbc5 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -187,7 +187,11 @@ int dir_aff_log(const dir_data_t *dir_data, const file_data_t*dir_list)
str,
(unsigned int)current_file->stat.st_uid,
(unsigned int)current_file->stat.st_gid,
+#ifdef DJGPP
+ (long long unsigned int)current_file->file_size,
+#else
(long long unsigned int)current_file->stat.st_size,
+#endif
datestr);
if(dir_data!=NULL && (dir_data->param&FLAG_LIST_PATHNAME)!=0)
{
@@ -241,7 +245,11 @@ int log_list_file(const disk_t *disk, const partition_t *partition, const dir_da
log_info("%7lu ",(unsigned long int)current_file->stat.st_ino);
log_info("%s %5u %5u ",
str, (unsigned int)current_file->stat.st_uid, (unsigned int)current_file->stat.st_gid);
+#ifdef DJGPP
+ log_info("%9llu", (long long unsigned int)current_file->file_size);
+#else
log_info("%9llu", (long long unsigned int)current_file->stat.st_size);
+#endif
log_info(" %s %s\n", datestr, current_file->name);
}
return test_date;