# HG changeset patch # User patrickz # Date 1548297791 -28800 # Thu Jan 24 10:43:11 2019 +0800 # Node ID a176d0e0fe6301903a4bbd7397cb0c7a7bce1b79 # Parent 730ab7cafbc737d80e7503ff73834eb190ae38f4 8215976: Port the fix or gmtime_r declaration conflicts to 8u diff -r 730ab7cafbc7 -r a176d0e0fe63 src/share/native/com/sun/java/util/jar/pack/zip.cpp --- a/src/share/native/com/sun/java/util/jar/pack/zip.cpp Mon Sep 24 14:42:34 2018 -0700 +++ b/src/share/native/com/sun/java/util/jar/pack/zip.cpp Thu Jan 24 10:43:11 2019 +0800 @@ -415,9 +415,11 @@ ((uLong)h << 11) | ((uLong)m << 5) | ((uLong)s >> 1); } -#ifdef _REENTRANT // solaris -extern "C" struct tm *gmtime_r(const time_t *, struct tm *); -#else +/* + * For thread-safe reasons, non-Windows platforms need gmtime_r + * while Windows can directly use gmtime that is already thread-safe. + */ +#ifdef _MSC_VER #define gmtime_r(t, s) gmtime(t) #endif /*