1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-05 19:35:48 +03:00

Include mbedtls/platform_time.h conditionally on MBEDTLS_HAVE_TIME

Work around https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/393

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2025-07-26 00:15:21 +02:00
parent 1b4bfdf554
commit 409c688c4b
2 changed files with 10 additions and 1 deletions

View File

@@ -12,6 +12,11 @@
#include "mbedtls/platform.h"
#include <string.h>
/* Work around https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/393 */
#if defined(MBEDTLS_HAVE_TIME)
#include <mbedtls/platform_time.h>
#endif
INCLUDE_HEADERS
/*

View File

@@ -121,7 +121,11 @@ for my $root (@header_roots) {
map {s!^\Q$root/!!} @paths;
# Exclude some headers that are included by build_info.h and cannot
# be included directly.
push @header_files, grep {!m!_config\.h|[/_]adjust[/_]!} @paths;
push @header_files, grep {!m[
^mbedtls/platform_time\.h$ | # errors without time.h
_config\.h |
[/_]adjust[/_]
]x} @paths;
}
my $include_headers = join('', map {"#include <$_>\n"} @header_files);