diff options
author | Rosen Penev <rosenp@gmail.com> | 2023-01-09 06:15:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 15:15:55 +0100 |
commit | 0348e24bab24cc46642d29e3ceab64df22553298 (patch) | |
tree | e9d44e90d33989a413c9b726aa3b9d302949d142 /tar | |
parent | 2e9bcba70685383426ad42c8856c50ce3214ae24 (diff) | |
download | libarchive-0348e24bab24cc46642d29e3ceab64df22553298.tar.gz |
replace time64 functions with normal ones (#1830)
Otherwise there are 32/64-bit pointer conversions going on. In Windows
since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit
time_t.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tar')
-rw-r--r-- | tar/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -668,7 +668,7 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) time_t tim; static time_t now; struct tm *ltime; -#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) +#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S) struct tm tmbuf; #endif @@ -742,8 +742,8 @@ 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__LOCALTIME64_S) - ltime = _localtime64_s(&tmbuf, &tim) ? NULL : &tmbuf; +#if defined(HAVE_LOCALTIME_S) + ltime = localtime_s(&tmbuf, &tim) ? NULL : &tmbuf; #elif defined(HAVE_LOCALTIME_R) ltime = localtime_r(&tim, &tmbuf); #else |