mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 14:29:14 +08:00
cmake: only define _FILE_OFFSET_BITS and _TIME_BITS for glibc
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ include(${SDL3_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake)
|
|||||||
include(${SDL3_SOURCE_DIR}/cmake/3rdparty.cmake)
|
include(${SDL3_SOURCE_DIR}/cmake/3rdparty.cmake)
|
||||||
|
|
||||||
check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC)
|
check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC)
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
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
|
# Enable large file support on 32-bit glibc, so that we can access files with large inode numbers
|
||||||
target_compile_definitions(sdl-build-options INTERFACE "_FILE_OFFSET_BITS=64")
|
target_compile_definitions(sdl-build-options INTERFACE "_FILE_OFFSET_BITS=64")
|
||||||
# Enable 64-bit time_t on 32-bit glibc, so that time stamps remain correct beyond January 2038
|
# Enable 64-bit time_t on 32-bit glibc, so that time stamps remain correct beyond January 2038
|
||||||
|
|||||||
Reference in New Issue
Block a user