diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index fcba107a734c5f..ab717e34259111 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,7 @@ void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) { mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); -#if CONFIG_DEVICE_LAYER +#if CONFIG_DEVICE_LAYER && CHIP_CONFIG_ENABLE_ICD_SERVER DeviceLayer::ChipDeviceEvent event; event.Type = DeviceLayer::DeviceEventType::kICDMsgAckSyncEvent; event.AckSync.awaitingAck = messageNotAcked;