Fix conditions for including string.h in error.c

<string.h> is actually needed when MBEDTLS_ERROR_C is enabled and not
when only MBEDTLS_ERROR_STRERROR_DUMMY is enabled.

Fix #3866.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2020-11-09 15:14:10 +01:00
parent bce4dc028f
commit b64e0fe5e3
3 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Bugfix
* Fix conditions for including string.h in error.c. Fixes #3866.

View File

@ -19,7 +19,7 @@
#include "common.h"
#if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
#if defined(MBEDTLS_ERROR_C)
#include <string.h>
#endif

View File

@ -19,7 +19,7 @@
#include "common.h"
#if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
#if defined(MBEDTLS_ERROR_C)
#include <string.h>
#endif