From a184dc9bbf10b35e043772ec6b78843c1d52c924 Mon Sep 17 00:00:00 2001 From: Zhangwx Date: Sat, 25 Nov 2023 01:07:57 +0800 Subject: [PATCH] [platform] fix compiling issue when use `SuccessOrDie` (#9640) Missing a header file included in the file `exit_code.h`, and 'otLogCritPlat' will not be declared. If using the function `SuccessOrDie` with only inlcude the file `src/lib/platform/exit_code.h`, it will have a compiling error `'otLogCritPlat' was not declared in this scope`. --- src/lib/platform/BUILD.gn | 1 + src/lib/platform/exit_code.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/platform/BUILD.gn b/src/lib/platform/BUILD.gn index c46831e0b..49525340f 100644 --- a/src/lib/platform/BUILD.gn +++ b/src/lib/platform/BUILD.gn @@ -38,5 +38,6 @@ config("platform_config") { static_library("libopenthread-platform") { sources = platform_sources + public_deps = [ "../../core:libopenthread_core_headers" ] public_configs = [ ":platform_config" ] } diff --git a/src/lib/platform/exit_code.h b/src/lib/platform/exit_code.h index 4aef8bdd2..ee9e7d237 100644 --- a/src/lib/platform/exit_code.h +++ b/src/lib/platform/exit_code.h @@ -38,6 +38,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { #endif