From 6952d1a5ea9d0436268538b6e376ec652a77c8ea Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 19 Jul 2024 18:30:31 -0500 Subject: [PATCH] wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE(). --- wolfssl/wolfcrypt/error-crypt.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 6b2f31f5ba..8fb71b3c6a 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -300,10 +300,16 @@ WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error); #ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label) #ifndef WC_ERR_TRACE + #ifdef NO_STDIO_FILESYSTEM + #define WC_ERR_TRACE(label) \ + ( printf("ERR TRACE: %s L %d " #label " (%d)\n", \ + __FILE__, __LINE__, label), label) + #else #define WC_ERR_TRACE(label) \ ( fprintf(stderr, \ "ERR TRACE: %s L %d " #label " (%d)\n", \ __FILE__, __LINE__, label), label) + #endif #endif #include #else