diff --git a/src/share/native/com/sun/java/util/jar/pack/zip.cpp b/src/share/native/com/sun/java/util/jar/pack/zip.cpp index a66fdcdf2ac5fca4f14f3e55fea6cfcfc25246cb..f58c94956c04761bd422acea636aaaeefc6f77f6 100644 --- a/src/share/native/com/sun/java/util/jar/pack/zip.cpp +++ b/src/share/native/com/sun/java/util/jar/pack/zip.cpp @@ -415,9 +415,11 @@ uLong jar::dostime(int y, int n, int d, int h, int m, int s) { ((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 /*