summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/bbunzip.c8
-rw-r--r--archival/libunarchive/data_extract_all.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index f81aab8..22a0fd1 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -105,10 +105,12 @@ int FAST_FUNC bbunpack(char **argv,
if (status >= 0) {
/* TODO: restore other things? */
if (info.mtime) {
- struct timeval times = {.tv_sec = info.mtime,
- .tv_usec = 0};
+ struct timeval times;
+
+ times.tv_sec = info.mtime;
+ times.tv_usec = 0;
/* Note: we closed it first.
- * On some systems calling utime
+ * On some systems calling utimes
* then closing resets the mtime
* back to current time. */
utimes(new_name, &times); /* ignoring errors */
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 889face..294024b 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -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);
}
}