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:
ashutosh0x
2026-02-11 22:32:21 +05:30
parent cc5d544d15
commit 2ab76ec4f5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
#include "user/user_vfs.h"
#include <sys/stat.h>
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#define stat _stat
#endif