From b1b4f122269fefd5c5644b7f093b8b0f7a9fdbe8 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 4 Feb 2025 14:40:30 +0800 Subject: [PATCH 09/10] _FILE_OFFSET_BITS=64 should not be Linux-only --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git CMakeLists.txt CMakeLists.txt index 108e89f33..76c79d0d8 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -454,12 +454,15 @@ sdl_pc_link_options("-lSDL3") # with large inode numbers check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC) if (LIBC_IS_GLIBC AND CMAKE_SIZEOF_VOID_P EQUAL 4) - # Enable large file support on 32-bit glibc, so that we can access files with large inode numbers - sdl_compile_definitions(PRIVATE "_FILE_OFFSET_BITS=64") # Enable 64-bit time_t on 32-bit glibc, so that time stamps remain correct beyond January 2038 sdl_compile_definitions(PRIVATE "_TIME_BITS=64") endif() +if (CMAKE_SIZEOF_VOID_P EQUAL 4) + # Enable large file support on 32-bit glibc, so that we can access files with large inode numbers + sdl_compile_definitions(PRIVATE "_FILE_OFFSET_BITS=64") +endif() + check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT) if(HAVE_WL_VERSION_SCRIPT) sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym") -- 2.48.0