]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fixed build with mingw
authorPatrick von Reth <vonreth@kde.org>
Sat, 17 May 2014 13:29:05 +0000 (15:29 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 18 May 2014 13:14:36 +0000 (15:14 +0200)
_localtime32 was removed from the runtime because it was only avalible at
some Windows versions.
Maybe the time_t* cast could be used on all systems?

util.c

diff --git a/util.c b/util.c
index f72b383150bf31f0a0889e117056c7c3df9479c8..156c0bead0be935f05920d7543a938c5bc464ba4 100644 (file)
--- a/util.c
+++ b/util.c
@@ -74,7 +74,7 @@ log_prefix(bool log_updated_time)
        if (log_updated_time) {
                gettimeofday(&tv, NULL);
 #ifdef __MINGW64_VERSION_MAJOR
-               tm = _localtime32(&tv.tv_sec);
+               tm = localtime((time_t*)&tv.tv_sec);
 #else
                tm = localtime(&tv.tv_sec);
 #endif