From 719ed213d5505e42eb77746461805a047eb0c19c Mon Sep 17 00:00:00 2001 From: Kareem Date: Fri, 4 Mar 2022 14:51:31 -0700 Subject: [PATCH] Add separate "struct stat" definition XSTAT_TYPE to make overriding XSTAT easier. --- wolfssl/wolfcrypt/wc_port.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 9170777b2..95365c3e2 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -579,6 +579,10 @@ WOLFSSL_API int wolfCrypt_Cleanup(void); #define XS_ISREG(s) S_ISREG(s) #define SEPARATOR_CHAR ':' #endif + + #ifndef XSTAT_TYPE + #define XSTAT_TYPE struct XSTAT + #endif #endif #endif @@ -598,7 +602,7 @@ WOLFSSL_API int wolfCrypt_Cleanup(void); #ifdef USE_WINDOWS_API WIN32_FIND_DATAA FindFileData; HANDLE hFind; - struct XSTAT s; + XSTAT_TYPE s; #elif defined(WOLFSSL_ZEPHYR) struct fs_dirent entry; struct fs_dir_t dir; @@ -619,7 +623,7 @@ WOLFSSL_API int wolfCrypt_Cleanup(void); #else struct dirent* entry; DIR* dir; - struct XSTAT s; + XSTAT_TYPE s; #endif char name[MAX_FILENAME_SZ]; } ReadDirCtx;