]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add ST_MTIME_NSEC case to archive_entry_copy_stat 666/head 667/head
authordosomder <dosomder@users.noreply.github.com>
Fri, 11 Mar 2016 19:06:17 +0000 (20:06 +0100)
committerdosomder <dosomder@users.noreply.github.com>
Fri, 11 Mar 2016 19:06:17 +0000 (20:06 +0100)
Android uses st_mtime_nsec

contrib/android/config/android.h
libarchive/archive_entry_copy_stat.c

index 5d2abaa86e0841ec1017463998b4754d748e82df..d795067a0848f941253b016f008600c7afa7e000 100644 (file)
 #define HAVE_STRING_H 1
 #define HAVE_STRRCHR 1
 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
 #define HAVE_STRUCT_TM_TM_GMTOFF 1
 #define HAVE_SYMLINK 1
 #define HAVE_SYS_CDEFS_H 1
index 37d4d6edbd86691a0dae65ebfed6f2c478fc2a15..ac83868e8f8acda8ce3036ac0b944113cff66d0c 100644 (file)
@@ -44,6 +44,10 @@ archive_entry_copy_stat(struct archive_entry *entry, const struct stat *st)
        archive_entry_set_atime(entry, st->st_atime, st->st_atim.tv_nsec);
        archive_entry_set_ctime(entry, st->st_ctime, st->st_ctim.tv_nsec);
        archive_entry_set_mtime(entry, st->st_mtime, st->st_mtim.tv_nsec);
+#elif HAVE_STRUCT_STAT_ST_MTIME_NSEC
+       archive_entry_set_atime(entry, st->st_atime, st->st_atime_nsec);
+       archive_entry_set_ctime(entry, st->st_ctime, st->st_ctime_nsec);
+       archive_entry_set_mtime(entry, st->st_mtime, st->st_mtime_nsec);
 #elif HAVE_STRUCT_STAT_ST_MTIME_N
        archive_entry_set_atime(entry, st->st_atime, st->st_atime_n);
        archive_entry_set_ctime(entry, st->st_ctime, st->st_ctime_n);