Assimp: Fix compilation with GCC 12 and update to v5.2.4 (#1242)
* Assimp: Fix compilation with GCC 12 * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update assimp to v5.2.4 * Fix Windows on x86 See https://github.com/assimp/assimp/issues/4540 * Fix patch checksumpull/1244/head
parent
871353d91a
commit
332ef7d33a
2 changed files with 34 additions and 1 deletions
@ -0,0 +1,22 @@ |
||||
diff --git a/code/Common/DefaultIOStream.cpp b/code/Common/DefaultIOStream.cpp
|
||||
index e30f26acd3..17fc44f9a2 100644
|
||||
--- a/code/Common/DefaultIOStream.cpp
|
||||
+++ b/code/Common/DefaultIOStream.cpp
|
||||
@@ -63,7 +63,7 @@ inline int select_fseek(FILE *file, int64_t offset, int origin) {
|
||||
|
||||
|
||||
|
||||
-#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
+#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
template <>
|
||||
inline size_t select_ftell<8>(FILE *file) {
|
||||
return (size_t)::_ftelli64(file);
|
||||
@@ -149,7 +149,7 @@ size_t DefaultIOStream::FileSize() const {
|
||||
//
|
||||
// See here for details:
|
||||
// https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
|
||||
-#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
+#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
struct __stat64 fileStat;
|
||||
//using fileno + fstat avoids having to handle the filename
|
||||
int err = _fstat64(_fileno(mFile), &fileStat);
|
Loading…
Reference in new issue