summaryrefslogtreecommitdiff
path: root/tar/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tar/util.c')
-rw-r--r--tar/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tar/util.c b/tar/util.c
index 5a4ab0b3..6ce26c13 100644
--- a/tar/util.c
+++ b/tar/util.c
@@ -746,15 +746,15 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry)
fmt = bsdtar->day_first ? DAY_FMT " %b %Y" : "%b " DAY_FMT " %Y";
else
fmt = bsdtar->day_first ? DAY_FMT " %b %H:%M" : "%b " DAY_FMT " %H:%M";
-#if defined(HAVE_LOCALTIME_R)
- ltime = localtime_r(&tim, &tmbuf);
-#elif defined(HAVE__LOCALTIME64_S)
+#if defined(HAVE__LOCALTIME64_S)
tmptime = tim;
terr = _localtime64_s(&tmbuf, &tmptime);
if (terr)
ltime = NULL;
else
ltime = &tmbuf;
+#elif defined(HAVE_LOCALTIME_R)
+ ltime = localtime_r(&tim, &tmbuf);
#else
ltime = localtime(&tim);
#endif