|
@@ -7,8 +7,24 @@
|
|
|
#ifndef _PLATFORM_INTERNAL_H
|
|
#ifndef _PLATFORM_INTERNAL_H
|
|
|
#define _PLATFORM_INTERNAL_H
|
|
#define _PLATFORM_INTERNAL_H
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
|
|
+ * Modern Zephyr uses zephyr/ namespace.
|
|
|
|
|
+ *
|
|
|
|
|
+ * Note: Cannot use KERNEL_VERSION_NUMBER here as it's defined in version.h
|
|
|
|
|
+ * which we're trying to include. Must use feature detection instead.
|
|
|
|
|
+ */
|
|
|
|
|
+#ifdef __has_include
|
|
|
|
|
+#if __has_include(<zephyr/autoconf.h>)
|
|
|
|
|
+#include <zephyr/autoconf.h>
|
|
|
|
|
+#include <zephyr/version.h>
|
|
|
|
|
+#else
|
|
|
#include <autoconf.h>
|
|
#include <autoconf.h>
|
|
|
#include <version.h>
|
|
#include <version.h>
|
|
|
|
|
+#endif
|
|
|
|
|
+#else
|
|
|
|
|
+#include <autoconf.h>
|
|
|
|
|
+#include <version.h>
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */
|
|
#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */
|
|
|
#include <zephyr.h>
|
|
#include <zephyr.h>
|