summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar/bsdtar_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar/bsdtar_platform.h')
-rw-r--r--usr.bin/tar/bsdtar_platform.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index e4728e3..58d9d85 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -135,11 +135,14 @@
#endif
#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
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctim.tv_nsec
#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtim.tv_nsec
#else
+#define ARCHIVE_STAT_CTIME_NANOS(st) (0)
#define ARCHIVE_STAT_MTIME_NANOS(st) (0)
#endif
#endif
OpenPOWER on IntegriCloud