We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e46f124 commit 94b3018Copy full SHA for 94b3018
1 file changed
src/time_unix.c
@@ -30,12 +30,17 @@ extern "C"
30
#include <math.h>
31
32
#if defined(__ZEPHYR__)
33
-#include <posix/time.h> // Points to Zephyr toolchain posix time implementation
+#include <version.h>
34
+#if KERNELVERSION >= ZEPHYR_VERSION(3, 1, 0)
35
+#include <zephyr/posix/time.h> // Points to Zephyr toolchain posix time implementation
36
#else
37
+#include <posix/time.h> // Points to Zephyr toolchain posix time implementation
38
+#endif
39
+#else // #if KERNELVERSION >= ZEPHYR_VERSION(3, 1, 0)
40
#include <time.h>
41
#endif // defined(__ZEPHYR__)
-#include <unistd.h>
42
43
+#include <unistd.h>
44
#include "./common.h"
45
#include "rcutils/allocator.h"
46
#include "rcutils/error_handling.h"
0 commit comments