use utimes() rather than obsolescent utime()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
This commit is contained in:
Bernhard Reutner-Fischer
2009-11-15 00:12:53 +01:00
parent cc8b6871a7
commit a307af1af6
4 changed files with 13 additions and 17 deletions

View File

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