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.

(Patch by Kenny Root.)

Change-Id: I96ef9cd7459d7e8202831a4e687dfbc055c9f50b
Reviewed-on: https://boringssl-review.googlesource.com/4091
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
Adam Langley 2015-03-20 16:38:14 -07:00
parent 3e719319be
commit 32ab7b0e74

View File

@ -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)