summaryrefslogtreecommitdiffstats
path: root/src/dir.h
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-11-06 09:46:08 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2012-11-06 09:46:08 +0100
commit34da5767b6235158fe1d1e2a784a40dbb590f9db (patch)
tree6cb89049881d951c3adeb4e87edabdf75a5f6d56 /src/dir.h
parent7d15a16cb83c2719f136785898ed3c6dd415f824 (diff)
Don't depend on "struct stat" for storing information about files, this
fix inode truncation when compiled with cygwin
Diffstat (limited to 'src/dir.h')
-rw-r--r--src/dir.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/dir.h b/src/dir.h
index 7a1598c..e203bcb 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -63,10 +63,14 @@ struct file_data
file_data_t *prev;
file_data_t *next;
char name[DIR_NAME_LEN];
- struct stat stat;
-#ifdef DJGPP
- uint64_t file_size;
-#endif
+ uint32_t st_ino;
+ uint32_t st_mode;
+ uint32_t st_uid;
+ uint32_t st_gid;
+ uint64_t st_size;
+ time_t td_atime; /* time of last access */
+ time_t td_mtime; /* time of last modification */
+ time_t td_ctime; /* time of last status change */
unsigned int status;
};
@@ -74,10 +78,14 @@ typedef struct
{
struct td_list_head list;
char *name;
- struct stat stat;
-#ifdef DJGPP
- uint64_t file_size;
-#endif
+ uint32_t st_ino;
+ uint32_t st_mode;
+ uint32_t st_uid;
+ uint32_t st_gid;
+ uint64_t st_size;
+ time_t td_atime; /* time of last access */
+ time_t td_mtime; /* time of last modification */
+ time_t td_ctime; /* time of last status change */
unsigned int status;
} file_info_t;