From: Joerg Sonnenberger Date: Mon, 22 Feb 2010 03:24:33 +0000 (-0500) Subject: Simplify birthtime handling and ensure that it is unset if the platform X-Git-Tag: v3.0.0a~1209 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06ddccbacfc0ebdce6021a6438c304b49608762a;p=thirdparty%2Flibarchive.git Simplify birthtime handling and ensure that it is unset if the platform doesn't support it. SVN-Revision: 1956 --- diff --git a/libarchive/archive_entry_copy_stat.c b/libarchive/archive_entry_copy_stat.c index 1a049ba3b..37d4d6edb 100644 --- a/libarchive/archive_entry_copy_stat.c +++ b/libarchive/archive_entry_copy_stat.c @@ -60,12 +60,13 @@ archive_entry_copy_stat(struct archive_entry *entry, const struct stat *st) archive_entry_set_atime(entry, st->st_atime, 0); archive_entry_set_ctime(entry, st->st_ctime, 0); archive_entry_set_mtime(entry, st->st_mtime, 0); -#if HAVE_STRUCT_STAT_ST_BIRTHTIME - archive_entry_set_birthtime(entry, st->st_birthtime, 0); -#endif #endif #if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC archive_entry_set_birthtime(entry, st->st_birthtime, st->st_birthtimespec.tv_nsec); +#elif HAVE_STRUCT_STAT_ST_BIRTHTIME + archive_entry_set_birthtime(entry, st->st_birthtime, 0); +#else + archive_entry_unset_birthtime(entry); #endif archive_entry_set_dev(entry, st->st_dev); archive_entry_set_gid(entry, st->st_gid);