Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify birthtime handling and ensure that it is unset if the platform

doesn't support it.

SVN-Revision: 1956
  • Loading branch information...
commit 06ddccbacfc0ebdce6021a6438c304b49608762a 1 parent 3a44b6b
Joerg Sonnenberger authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 libarchive/archive_entry_copy_stat.c
View
7 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);
Please sign in to comment.
Something went wrong with that request. Please try again.