From a0234377fc2c32b239b2b4bbf13bd617bc7932cf Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 20 Mar 2013 14:42:21 +0100 Subject: [PATCH] Made change to error.c for dummy error_strerror() permanent --- scripts/data_files/error.fmt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt index 535effc60..ee927578b 100644 --- a/scripts/data_files/error.fmt +++ b/scripts/data_files/error.fmt @@ -86,4 +86,22 @@ LOW_LEVEL_CODE_CHECKS snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); } +#else /* POLARSSL_ERROR_C */ + +#if defined(POLARSSL_ERROR_STRERROR_DUMMY) + +#include + +/* + * Provide an non-function in case POLARSSL_ERROR_C is not defined + */ +void error_strerror( int ret, char *buf, size_t buflen ) +{ + ((void) ret); + + if( buflen > 0 ) + buf[0] = '\0'; +} + +#endif /* POLARSSL_ERROR_STRERROR_DUMMY */ #endif /* POLARSSL_ERROR_C */