From 193fe893a696b624ce2348b608e458adb14c87af Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Wed, 5 Sep 2018 11:47:33 +0100 Subject: [PATCH] Add missing _POSIX_C_SOURCE define in threading.h --- include/mbedtls/threading.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/mbedtls/threading.h b/include/mbedtls/threading.h index e613be9c2..71538c07a 100644 --- a/include/mbedtls/threading.h +++ b/include/mbedtls/threading.h @@ -24,6 +24,12 @@ #ifndef MBEDTLS_THREADING_H #define MBEDTLS_THREADING_H +/* + * Ensure gmtime_r is available even with -std=c99; must be included before + * config.h, which pulls in glibc's features.h. Harmless on other platforms. + */ +#define _POSIX_C_SOURCE 200112L + #if !defined(MBEDTLS_CONFIG_FILE) #include "config.h" #else