mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-30 00:51:06 +02:00
Add compile guard in platform.h
We may want to include it just for the errors it defines without having all of the other defines that only make sense when PLATFORM_C is enabled.
This commit is contained in:
@@ -39,14 +39,16 @@
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#include "platform_time.h"
|
||||
#endif
|
||||
|
||||
#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 /**< Hardware accelerator failed */
|
||||
#define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 /**< The requested feature is not supported by the platform */
|
||||
#define MBEDTLS_ERR_PLATFORM_FAULT_DETECTED -0x0071 /**< A fault was detected in a critical path, likely indicative of an active physical attack */
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#include "platform_time.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -365,4 +367,6 @@ void mbedtls_platform_teardown( mbedtls_platform_context *ctx );
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
|
||||
#endif /* platform.h */
|
||||
|
||||
Reference in New Issue
Block a user