diff --git a/src/posix/platform/multicast_routing.cpp b/src/posix/platform/multicast_routing.cpp index d3c8b15d6..78ee55420 100644 --- a/src/posix/platform/multicast_routing.cpp +++ b/src/posix/platform/multicast_routing.cpp @@ -434,7 +434,7 @@ const char *MulticastRoutingManager::MifIndexToString(MifIndex aMif) void MulticastRoutingManager::DumpMulticastForwardingCache(void) const { -#if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_DEBG +#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_DEBG otLogDebgPlat("MulticastRoutingManager: ==================== MFC ENTRIES ===================="); for (const MulticastForwardingCache &mfc : mMulticastForwardingCacheTable)