diff --git a/packages/a/assimp/patches/5.4.3/fix_mingw.patch b/packages/a/assimp/patches/5.4.3/fix_mingw.patch new file mode 100644 index 00000000000..8bb435999b8 --- /dev/null +++ b/packages/a/assimp/patches/5.4.3/fix_mingw.patch @@ -0,0 +1,16 @@ +diff --git a/code/Common/DefaultIOStream.cpp b/code/Common/DefaultIOStream.cpp +index e423eae4f8..35bbb67a5a 100644 +--- a/code/Common/DefaultIOStream.cpp ++++ b/code/Common/DefaultIOStream.cpp +@@ -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); diff --git a/packages/a/assimp/xmake.lua b/packages/a/assimp/xmake.lua index 9e746c3be39..2ee76757545 100644 --- a/packages/a/assimp/xmake.lua +++ b/packages/a/assimp/xmake.lua @@ -25,6 +25,7 @@ package("assimp") add_patches("v5.2.3", path.join(os.scriptdir(), "patches", "5.2.1", "fix_zlib_filefunc_def.patch"), "a9f8a9aa1975888ea751b80c8268296dee901288011eeb1addf518eac40b71b1") add_patches("v5.2.3", path.join(os.scriptdir(), "patches", "5.2.3", "cmake_static_crt.patch"), "3872a69976055bed9e40814e89a24a3420692885b50e9f9438036e8d809aafb4") add_patches("v5.2.4", path.join(os.scriptdir(), "patches", "5.2.4", "fix_x86_windows_build.patch"), "becb4039c220678cf1e888e3479f8e68d1964c49d58f14c5d247c86b4a5c3293") + add_patches("v5.4.3", path.join(os.scriptdir(), "patches", "5.4.3", "fix_mingw.patch"), "2498bb9438a0108becf1c514fcbfc103e012638914c9d21160572ed24a9fa3b3") if not is_host("windows") then add_extsources("pkgconfig::assimp")