summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-03-08 05:34:20 +0000
committerkientzle <kientzle@FreeBSD.org>2009-03-08 05:34:20 +0000
commit2016bf66edb8b2eea284180762cd6c086df1d766 (patch)
tree7e82e53121997f444829d2486e9d1e661b69931c /usr.bin/tar
parent65c5348f797c88ffca7591fa16eeeb6ec56a679f (diff)
downloadFreeBSD-src-2016bf66edb8b2eea284180762cd6c086df1d766.zip
FreeBSD-src-2016bf66edb8b2eea284180762cd6c086df1d766.tar.gz
Merge r552,r559 from libarchive.googlecode.com: High-resolution time
support on Tru64, AIX, and GNU Hurd, thanks to Björn Jacke.
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/bsdtar_platform.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index 53bec95..a641f5b 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -137,15 +137,22 @@
#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctimespec.tv_nsec
#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtimespec.tv_nsec
-#else
-#if HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+#elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctim.tv_nsec
#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtim.tv_nsec
+#elif HAVE_STRUCT_STAT_ST_MTIME_N
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctime_n
+#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtime_n
+#elif HAVE_STRUCT_STAT_ST_UMTIME
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_uctime * 1000
+#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_umtime * 1000
+#elif HAVE_STRUCT_STAT_ST_MTIME_USEC
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctime_usec * 1000
+#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtime_usec * 1000
#else
#define ARCHIVE_STAT_CTIME_NANOS(st) (0)
#define ARCHIVE_STAT_MTIME_NANOS(st) (0)
#endif
-#endif
/* How to mark functions that don't return. */
/* This facilitates use of some newer static code analysis tools. */
OpenPOWER on IntegriCloud