This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch releases/12.12
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.12 by this push:
new 4cf07dd756a cmake:add missing cflag "-D_FILE_OFFSET_BITS=64" of sim
4cf07dd756a is described below
commit 4cf07dd756acd15e628b8ab68e40c98a33263487
Author: guohao15 <[email protected]>
AuthorDate: Mon Jul 21 11:06:49 2025 +0800
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 <[email protected]>
---
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()