mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
CMake: Avoid using fseeko64/ftello64/etc on non-Linux
off_t is always 64-bit on BSDs but Large File Support API is not supported. ld: error: undefined symbol: fseeko64 >>> referenced by hash.c >>> hash.c.o:(filereader_seek) in archive lib/librcheevos.a ld: error: undefined symbol: ftello64 >>> referenced by hash.c >>> hash.c.o:(filereader_tell) in archive lib/librcheevos.a Based on https://github.com/citra-emu/citra/commit/26af2b644ce6
This commit is contained in:
parent
d18dea4f6a
commit
9472e7e152
@ -425,7 +425,9 @@ if(NOT MSVC)
|
||||
endif()
|
||||
add_definitions(-D_XOPEN_SOURCE=700)
|
||||
add_definitions(-D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1 -D_BSD_SOURCE -D_DEFAULT_SOURCE)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux|SunOS" OR MINGW)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
|
||||
add_definitions(-D_NETBSD_SOURCE)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user