From 14874d26f445981d6e1554486a5562ab3a91d11e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 20 Feb 2022 11:53:26 +0100 Subject: [PATCH] Fix stat for 32-biut linuxes - Reenable fix to ensure that stat works correctly on 32-bit linuxes again - stat will return 32-bit inodes when checking a file. So when this call will be used on a 64-bit linux this will cause errors like: Error writing to foo: Value too large for defined data type File I/O error: foo - closes https://github.com/assimp/assimp/issues/4390 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c4e7dbd4..1cdf617d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,13 @@ SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names") IF( UNIX ) # Use GNUInstallDirs for Unix predefined directories INCLUDE(GNUInstallDirs) + # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux + IF( ${OPERATING_SYSTEM} MATCHES "Android") + ELSE() + IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux + #ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 ) + ENDIF() + ENDIF() ENDIF() # Grouped compiler settings ########################################