Fix: Fix build for mingw10 (#5916)

- closes https://github.com/assimp/assimp/issues/5827
This commit is contained in:
Kim Kulling
2024-12-10 23:40:02 +01:00
committed by GitHub
parent 46c26eda5a
commit 28ebc8452b

View File

@@ -157,9 +157,9 @@ size_t DefaultIOStream::FileSize() const {
return 0;
mCachedSize = (size_t)(fileStat.st_size);
#elif defined _WIN32
struct _stat32 fileStat;
struct _stat fileStat;
//using fileno + fstat avoids having to handle the filename
int err = _fstat32(_fileno(mFile), &fileStat);
int err = _fstat(_fileno(mFile), &fileStat);
if (0 != err)
return 0;
mCachedSize = (size_t)(fileStat.st_size);