diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 6b2f31f5b..8fb71b3c6 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