From 28c8cce051fc90141453a85d16f84527926ffbf5 Mon Sep 17 00:00:00 2001 From: Mateusz Starzyk Date: Fri, 21 May 2021 09:48:03 +0200 Subject: [PATCH] Add conditional error.h include to test helpers function. `mbedtls_test_hook_error_add` is referenced inside main_test.function. Including the `error.h` is necessary to build suites which define both MBEDTLS_TEST_HOOKS and MBEDTLS_ERROR_C, such as: build_psa_accel_alg_ecdh Signed-off-by: Mateusz Starzyk --- tests/suites/helpers.function | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function index ca03532ba2..ae1bc888d5 100644 --- a/tests/suites/helpers.function +++ b/tests/suites/helpers.function @@ -11,6 +11,9 @@ #include +#if defined (MBEDTLS_ERROR_C) +#include "mbedtls/error.h" +#endif #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else