From ffa1eccb31d1a8d4aaf405f41962c799efc51d57 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Fri, 28 Oct 2022 09:11:00 +0200 Subject: [PATCH] time_unix: uses ZEPHYR_VERSION_CODE instead (#390) of KERNELVERSION, since zephyr from 2.7 does not use it anymore. Signed-off-by: Felipe Neves Fix Signed-off-by: Pablo Garrido Update Signed-off-by: Pablo Garrido --- src/time_unix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/time_unix.c b/src/time_unix.c index ab6ec6e9..8cbc40a6 100644 --- a/src/time_unix.c +++ b/src/time_unix.c @@ -30,7 +30,12 @@ extern "C" #include #if defined(__ZEPHYR__) -#include // Points to Zephyr toolchain posix time implementation +#include +#if ZEPHYR_VERSION_CODE >= ZEPHYR_VERSION(3, 1, 0) +#include // Points to Zephyr toolchain posix time implementation +#else +#include +#endif // ZEPHYR_VERSION_CODE >= ZEPHYR_VERSION(3, 1, 0) #else #include #endif // defined(__ZEPHYR__)