mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 19:37:06 -05:00
Fixes build in Windows.
This commit is contained in:
parent
df717723ac
commit
0d3ec44803
2 changed files with 8 additions and 1 deletions
6
list.c
6
list.c
|
|
@ -48,7 +48,9 @@ void state_list(struct snapraid_state* state)
|
|||
/* for each file */
|
||||
for(j=disk->filelist;j!=0;j=j->next) {
|
||||
struct snapraid_file* file = j->data;
|
||||
#if HAVE_LOCALTIME_R
|
||||
struct tm tm_res;
|
||||
#endif
|
||||
struct tm* tm;
|
||||
time_t t;
|
||||
|
||||
|
|
@ -58,7 +60,11 @@ void state_list(struct snapraid_state* state)
|
|||
fprintf(stdlog, "file:%s:%s:%"PRIu64":%"PRIi64":%u:%"PRIi64"\n", disk->name, file->sub, file->size, file->mtime_sec, file->mtime_nsec, file->inode);
|
||||
|
||||
t = file->mtime_sec;
|
||||
#if HAVE_LOCALTIME_R
|
||||
tm = localtime_r(&t, &tm_res);
|
||||
#else
|
||||
tm = localtime(&t);
|
||||
#endif
|
||||
|
||||
printf("%12"PRIu64" ", file->size);
|
||||
if (tm) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue