From 635d81a76b48b65c3ebdd93a321a284b9f62dec4 Mon Sep 17 00:00:00 2001 From: guohao15 Date: Mon, 21 Jul 2025 11:06:49 +0800 Subject: [PATCH] cmake:add missing cflag "-D_FILE_OFFSET_BITS=64" of sim The -D_FILE_OFFSET_BITS=64 parameter is missing during the CMake compilation of the sim (simulator) build, which causes incorrect version invocations of interfaces such as hostfs_stat. Signed-off-by: guohao15 --- arch/sim/src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/sim/src/CMakeLists.txt b/arch/sim/src/CMakeLists.txt index 57c8c6e04b8..1a9a5bd0182 100644 --- a/arch/sim/src/CMakeLists.txt +++ b/arch/sim/src/CMakeLists.txt @@ -30,3 +30,7 @@ if(NOT CONFIG_BUILD_FLAT) target_include_directories(arch_interface BEFORE PUBLIC ${CONFIG_ARCH_CHIP} common) endif() + +if(CONFIG_FS_LARGEFILE) + target_compile_options(nuttx PRIVATE -D_FILE_OFFSET_BITS=64) +endif()