From 61c9f9beac9d606c2b293dae124284eee7712eb6 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 7 Apr 2022 02:17:14 +0600 Subject: [PATCH] cmake: Enable 64-bit file support on 32-bit Linux --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 06cebf82b..36df54404 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,6 +19,10 @@ add_executable(86Box 86box.c config.c log.c random.c timer.c io.c acpi.c apm.c dma.c ddma.c discord.c nmi.c pic.c pit.c port_6x.c port_92.c ppi.c pci.c mca.c usb.c fifo8.c device.c nvr.c nvr_at.c nvr_ps2.c) +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + add_compile_definitions(_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LARGEFILE64_SOURCE=1) +endif() + if(CPPTHREADS) target_sources(86Box PRIVATE thread.cpp) endif()