some non-gnu compilers can't have non-const struct initializers

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-11-15 02:28:56 +01:00
parent a307af1af6
commit 389cca4b9e
4 changed files with 18 additions and 11 deletions

View File

@@ -143,8 +143,10 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
}
/* same for utime */
if (archive_handle->ah_flags & ARCHIVE_RESTORE_DATE) {
struct timeval t = {.tv_sec = file_header->mtime,
.tv_usec = 0};
struct timeval t;
t.tv_sec = file_header->mtime;
t.tv_usec = 0;
utimes(file_header->name, &t);
}
}