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 /test_utils | |
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 'test_utils')
-rw-r--r-- | test_utils/test_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c index 81b5002f..3250423a 100644 --- a/test_utils/test_main.c +++ b/test_utils/test_main.c @@ -3868,7 +3868,7 @@ main(int argc, char **argv) #endif time_t now; struct tm *tmptr; -#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) +#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S) struct tm tmbuf; #endif char *refdir_alloc = NULL; @@ -4105,8 +4105,8 @@ main(int argc, char **argv) */ now = time(NULL); for (i = 0; ; i++) { -#if defined(HAVE__LOCALTIME64_S) - tmptr = _localtime64_s(&tmbuf, &now) ? NULL : &tmbuf; +#if defined(HAVE_LOCALTIME_S) + tmptr = localtime_s(&tmbuf, &now) ? NULL : &tmbuf; #elif defined(HAVE_LOCALTIME_R) tmptr = localtime_r(&now, &tmbuf); #else |