From e71a79f6798426d5dfba7ac0bf7382de296d895c Mon Sep 17 00:00:00 2001 From: luoxu Date: Mon, 11 Aug 2025 15:17:55 +0800 Subject: [PATCH] fix(bt): Fixed the issue of duplicate MAX macro definitions --- components/bt/common/include/bt_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bt/common/include/bt_common.h b/components/bt/common/include/bt_common.h index d8fb107878..f687e3afe7 100644 --- a/components/bt/common/include/bt_common.h +++ b/components/bt/common/include/bt_common.h @@ -141,7 +141,9 @@ #define LOG_LOCAL_LEVEL_MAPPING LOG_LOCAL_LEVEL #endif +#ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif #define BT_LOG_LEVEL_CHECK(LAYER, LEVEL) (MAX(LAYER##_INITIAL_TRACE_LEVEL, LOG_LOCAL_LEVEL_MAPPING) >= BT_TRACE_LEVEL_##LEVEL)