Bug 1406736 Match MinGW's macro so we declare gmtime_r under MinGW too r?froydnj
MozReview-Commit-ID: 2U2ToeyVUUt
old mode 100644
new mode 100755
--- a/security/pkix/test/lib/pkixtestutil.cpp
+++ b/security/pkix/test/lib/pkixtestutil.cpp
@@ -244,17 +244,17 @@ Integer(long value)
ByteString encodedValue;
encodedValue.push_back(static_cast<uint8_t>(value));
return TLV(der::INTEGER, encodedValue);
}
enum TimeEncoding { UTCTime = 0, GeneralizedTime = 1 };
// Windows doesn't provide gmtime_r, but it provides something very similar.
-#if defined(WIN32) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if defined(WIN32) && (!defined(_POSIX_C_SOURCE) || !defined(_POSIX_THREAD_SAFE_FUNCTIONS))
static tm*
gmtime_r(const time_t* t, /*out*/ tm* exploded)
{
if (gmtime_s(exploded, t) != 0) {
return nullptr;
}
return exploded;
}