Skip to content

Commit

Permalink
wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition f…
Browse files Browse the repository at this point in the history
…or WC_ERR_TRACE().
  • Loading branch information
douzzer committed Jul 19, 2024
1 parent 575df43 commit 6952d1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wolfssl/wolfcrypt/error-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wolfssl/debug-trace-error-codes.h>
#else
Expand Down

0 comments on commit 6952d1a

Please sign in to comment.