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:
@@ -12,6 +12,11 @@
|
|||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#include <string.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
|
INCLUDE_HEADERS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -121,7 +121,11 @@ for my $root (@header_roots) {
|
|||||||
map {s!^\Q$root/!!} @paths;
|
map {s!^\Q$root/!!} @paths;
|
||||||
# Exclude some headers that are included by build_info.h and cannot
|
# Exclude some headers that are included by build_info.h and cannot
|
||||||
# be included directly.
|
# 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);
|
my $include_headers = join('', map {"#include <$_>\n"} @header_files);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user