summaryrefslogtreecommitdiffstats
path: root/contrib/libarchive/libarchive/archive_entry_copy_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libarchive/libarchive/archive_entry_copy_stat.c')
-rw-r--r--contrib/libarchive/libarchive/archive_entry_copy_stat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/libarchive/libarchive/archive_entry_copy_stat.c b/contrib/libarchive/libarchive/archive_entry_copy_stat.c
index 615d3b0..c4ed217 100644
--- a/contrib/libarchive/libarchive/archive_entry_copy_stat.c
+++ b/contrib/libarchive/libarchive/archive_entry_copy_stat.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#endif
+#include "archive.h"
#include "archive_entry.h"
void
@@ -59,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);
OpenPOWER on IntegriCloud