Skip to content

Commit 8d2a4be

Browse files
committed
arch: posix: instruct native_sim to use 64-bit time_t
Use a 64-bit time_t on native_sim. This ensures that native_sim (and hopefully also platforms based on it?) uses a 64-bit time_t type in the native C library. This is important to ensure that e.g. the Y2K bug isn't an issue, among other things. With that, the size of time_t in Zephyr is uniform across all supported architectures and platforms. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1 parent eeb8e7f commit 8d2a4be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/posix/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ else() # Linux.x86_64
5454
zephyr_compile_options(-m32)
5555
zephyr_link_libraries(-m32)
5656

57+
zephyr_compile_options(-D__USE_TIME_BITS64=1)
58+
5759
target_link_options(native_simulator INTERFACE "-m32")
5860
target_compile_options(native_simulator INTERFACE "-m32")
5961

0 commit comments

Comments
 (0)