mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-04 18:27:46 +00:00
Declare platform requirements for test helpers before including any system header
If we rely on `tf_psa_crypto_common.h`, it's too late. And `common.h in 3.6 doesn't have platform requirements. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -14,6 +14,18 @@
|
||||
#ifndef TEST_TEST_COMMON_H
|
||||
#define TEST_TEST_COMMON_H
|
||||
|
||||
#if !defined(_POSIX_C_SOURCE)
|
||||
/* For standards-compliant access to
|
||||
* clock_gettime(), gmtime_r(), ...
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#endif
|
||||
|
||||
/* With GNU libc, define all the things, even when compiling with -pedantic. */
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
/* On Mingw-w64, force the use of a C99-compliant printf() and friends.
|
||||
* This is necessary on older versions of Mingw and/or Windows runtimes
|
||||
* where snprintf does not always zero-terminate the buffer, and does
|
||||
|
||||
Reference in New Issue
Block a user