From 60925462f1289d57f2d4a32962406b73011b45a3 Mon Sep 17 00:00:00 2001 From: eric-ocasio-nxp <49490515+eric-ocasio-nxp@users.noreply.github.com> Date: Thu, 27 Apr 2023 15:12:35 -0500 Subject: [PATCH] ModeSelect: Gate inclusion of on-off-server.h based on whether an on-off cluster is present in the app (#26263) * Gate inclusion of on-off-server.h based on whether an on-off cluster is present in the application. Build fails when no on-off cluster is present. * Need to move the gate so that it's after #include so that the macro gating macro is defined. It seems the headers includes have changed between the version of the file I was using (compnay-internal fork) and the one in master. --- src/app/clusters/mode-select-server/mode-select-server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index fdb19152f1473f..f4aac43abedb25 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -34,6 +33,10 @@ #include #include +#ifdef EMBER_AF_PLUGIN_ON_OFF +#include +#endif // EMBER_AF_PLUGIN_ON_OFF + using namespace std; using namespace chip; using namespace chip::app;