mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Add missing guard to mbedtls_test_hook_error_add
Add a missing guard for the definition and declaration of mbedtls_test_hook_error_add. Also make the declaration always visible when MBEDTLS_TEST_HOOKS is enabled. This fixes an issue when MBEDTLS_ERROR_C is not defined but MBEDTLS_TEST_HOOKS is. Signed-off-by: Chris Jones <christopher.jones@arm.com>
This commit is contained in:
@@ -893,8 +893,6 @@ const char * mbedtls_low_level_strerr( int error_code )
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
void (*mbedtls_test_hook_error_add)( int, int, const char *, int );
|
||||
|
||||
void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
size_t len;
|
||||
@@ -975,4 +973,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
|
||||
#endif /* MBEDTLS_ERROR_C */
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
void (*mbedtls_test_hook_error_add)( int, int, const char *, int );
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_ERROR_C || MBEDTLS_ERROR_STRERROR_DUMMY */
|
||||
|
Reference in New Issue
Block a user