diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index f534bf067eb1c4..f3bcc2cedcb8f4 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #endif @@ -207,7 +208,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, static bool mAssociationStarted; static BitFlags mConnectivityFlag; - static GDBusWpaSupplicant mWpaSupplicant; + static GDBusWpaSupplicant mWpaSupplicant CHIP_GUARDED_BY(mWpaSupplicantMutex); // Access to mWpaSupplicant has to be protected by a mutex because it is accessed from // the CHIP event loop thread and dedicated D-Bus thread started by platform manager. static std::mutex mWpaSupplicantMutex;