From 4ae691476f07164dee3d12d304a9eb0b4f0ea0a3 Mon Sep 17 00:00:00 2001 From: Zhangwx Date: Thu, 31 Aug 2023 04:25:33 +0800 Subject: [PATCH] [cli] fix RTT compiling issue (#9385) If macro OPENTHREAD_UART_RTT_ENABLE is not enabled, the file SEGGER_RTT.h and related should not be included. --- examples/platforms/utils/uart_rtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platforms/utils/uart_rtt.c b/examples/platforms/utils/uart_rtt.c index 9b682aa71..b5a42e09a 100644 --- a/examples/platforms/utils/uart_rtt.c +++ b/examples/platforms/utils/uart_rtt.c @@ -40,12 +40,12 @@ #include #include +#if OPENTHREAD_UART_RTT_ENABLE + #include "SEGGER_RTT.h" #include "uart.h" #include "uart_rtt.h" -#if OPENTHREAD_UART_RTT_ENABLE - static bool sUartInitialized = false; static bool sUartPendingUp = false;