Fix MinGW stat redefinition and thread-safe localtime
- Guard #define stat _stat with !defined(__MINGW32__) to avoid conflicts with MinGW's own POSIX-compliant stat implementation - Replace _MSC_VER check with defined(_WIN32) for localtime_s to allow all Windows compilers including MinGW to use the secure function Fixes #3038, #3037
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include "user/user_vfs.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#define stat _stat
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user