mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-26 21:35:35 +00:00
Add MBEDTLS_ERROR_C dependency to invasive error code testing
Fix builds where `MBEDTLS_ERROR_C` is not defined but `MBEDTLS_TEST_HOOKS` is defined. This was previously causing undefined reference errors in these builds. Signed-off-by: Chris Jones <christopher.jones@arm.com>
This commit is contained in:
parent
b179b84335
commit
759e30bdb0
@ -115,7 +115,7 @@ extern "C" {
|
|||||||
#define MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED -0x006E /**< This is a bug in the library */
|
#define MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED -0x006E /**< This is a bug in the library */
|
||||||
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_TEST_HOOKS)
|
#if defined(MBEDTLS_TEST_HOOKS) && defined(MBEDTLS_ERROR_C)
|
||||||
/**
|
/**
|
||||||
* \brief Set a function pointer (hook) to allow for invasive testing of error
|
* \brief Set a function pointer (hook) to allow for invasive testing of error
|
||||||
* code addition.
|
* code addition.
|
||||||
|
@ -283,7 +283,7 @@ $platform_code
|
|||||||
*/
|
*/
|
||||||
int main( int argc, const char *argv[] )
|
int main( int argc, const char *argv[] )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_TEST_HOOKS)
|
#if defined(MBEDTLS_TEST_HOOKS) && defined (MBEDTLS_ERROR_C)
|
||||||
mbedtls_set_err_add_hook( &mbedtls_test_err_add_check );
|
mbedtls_set_err_add_hook( &mbedtls_test_err_add_check );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user