Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e47ec70

Browse filesBrowse files
committed
time_unix: uses ZEPHYR_VERSION_CODE instead (ros2#390)
of KERNELVERSION, since zephyr from 2.7 does not use it anymore. Signed-off-by: Felipe Neves <felipe.neves@linaro.org> Fix Signed-off-by: Pablo Garrido <pablogs9@gmail.com> Update Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
1 parent 77a5682 commit e47ec70
Copy full SHA for e47ec70

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Open diff view settings
Collapse file

‎src/time_unix.c‎

Copy file name to clipboardExpand all lines: src/time_unix.c
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ extern "C"
3030
#include <math.h>
3131

3232
#if defined(__ZEPHYR__)
33-
#include <posix/time.h> // Points to Zephyr toolchain posix time implementation
33+
#include <version.h>
34+
#if ZEPHYR_VERSION_CODE >= ZEPHYR_VERSION(3, 1, 0)
35+
#include <zephyr/posix/time.h> // Points to Zephyr toolchain posix time implementation
36+
#else
37+
#include <time.h>
38+
#endif // ZEPHYR_VERSION_CODE >= ZEPHYR_VERSION(3, 1, 0)
3439
#else
3540
#include <time.h>
3641
#endif // defined(__ZEPHYR__)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.