diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cc812d093..475a32afbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1171,6 +1171,9 @@ if(SDL_LIBC) sdl_link_dependency(math LIBS m) list(APPEND CMAKE_REQUIRED_LIBRARIES m) endif() + if(UNIX) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) + endif() foreach(_FN IN LISTS symbols_to_check) string(TOUPPER ${_FN} _UPPER) set(LIBC_HAS_VAR "LIBC_HAS_${_UPPER}")