From 1f6fdd5a306c0a08f5dcf7ef6696c2efe4839882 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 4 Mar 2015 16:01:36 -0800 Subject: 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 --- src/crypto/time_support.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 /* for correct definition of gmtime_s */ +#undef MINGW_HAS_SECURE_API +#endif + #include #define SECS_PER_DAY (24 * 60 * 60) -- cgit v1.1