summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-03-04 16:01:36 -0800
committerKenny Root <kroot@google.com>2015-03-04 17:05:37 -0800
commit1f6fdd5a306c0a08f5dcf7ef6696c2efe4839882 (patch)
tree4f2afe09cb7ef601d84be9fa33835495286d60ab /src
parent7086cfcae53d483d858dca38f37ac54c95719de7 (diff)
downloadexternal_boringssl-1f6fdd5a306c0a08f5dcf7ef6696c2efe4839882.zip
external_boringssl-1f6fdd5a306c0a08f5dcf7ef6696c2efe4839882.tar.gz
external_boringssl-1f6fdd5a306c0a08f5dcf7ef6696c2efe4839882.tar.bz2
Use libmingwex for gmtime_s
gmtime_s first appeared in MSVCR80, but libmingwex has a helper function that tries to find the symbol or falls back to an internal implementation. Change-Id: I5bc27e1cfcc208eb9ea1159d47791fcc90bc7794
Diffstat (limited to 'src')
-rw-r--r--src/crypto/time_support.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/crypto/time_support.c b/src/crypto/time_support.c
index bbfe303..9302ebf 100644
--- a/src/crypto/time_support.c
+++ b/src/crypto/time_support.c
@@ -59,6 +59,12 @@
#define _POSIX_C_SOURCE 201410L /* for gmtime_r */
#endif
+#if defined(__MINGW32__)
+#define MINGW_HAS_SECURE_API 1 /* supplied by libmingwex */
+#include <sec_api/time_s.h> /* for correct definition of gmtime_s */
+#undef MINGW_HAS_SECURE_API
+#endif
+
#include <openssl/time_support.h>
#define SECS_PER_DAY (24 * 60 * 60)