diff options
author | Hanno Becker <hanno.becker@arm.com> | 2018-09-06 11:30:57 +0100 |
---|---|---|
committer | Hanno Becker <hanno.becker@arm.com> | 2018-09-06 11:30:57 +0100 |
commit | 323d8019bf7e581c2b376b019e7ae59796fcede2 (patch) | |
tree | 3fbcb5b405a66a7ead8a9519fe0b84dfba784ac8 /library/platform_util.c | |
parent | 03b2bd4a062dc3ba5e14f3a5fee36690fa6624d7 (diff) |
Correct preprocessor guards determining use of gmtime()
The previous code erroneously used gmtime_r() to implement
mbedtls_platform_gmtime() in case of a non-windows, non-unix system.
Diffstat (limited to 'library/platform_util.c')
-rw-r--r-- | library/platform_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/platform_util.c b/library/platform_util.c index 7e82293e..ca4d0331 100644 --- a/library/platform_util.c +++ b/library/platform_util.c @@ -81,6 +81,8 @@ void mbedtls_platform_zeroize( void *buf, size_t len ) defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \ defined(__MACH__))) #include <unistd.h> +#endif /* !_WIN32 && (unix || __unix || __unix__ || + * (__APPLE__ && __MACH__)) */ #if !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \ @@ -96,8 +98,6 @@ void mbedtls_platform_zeroize( void *buf, size_t len ) #endif /* !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \ _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) ) */ -#endif /* !_WIN32 && (unix || __unix || __unix__ || - * (__APPLE__ && __MACH__)) */ struct tm *mbedtls_platform_gmtime_r( const mbedtls_time_t *tt, struct tm *tm_buf ) |