Avoid redefining _POSIX_C_SOURCE
diff --git a/library/platform_util.c b/library/platform_util.c
index 9bcf15e..6a5feb3 100644
--- a/library/platform_util.c
+++ b/library/platform_util.c
@@ -24,7 +24,9 @@
* 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.
*/
+#if !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200112L
+#endif
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
diff --git a/library/threading.c b/library/threading.c
index 7231f2f..c1834ba 100644
--- a/library/threading.c
+++ b/library/threading.c
@@ -23,7 +23,9 @@
* 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.
*/
+#if !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200112L
+#endif
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"