Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions core/shared/platform/zephyr/platform_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,24 @@
#ifndef _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 <version.h>
#endif
#else
#include <autoconf.h>
#include <version.h>
#endif

#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */
#include <zephyr.h>
Expand Down
Loading