diff --git a/src/core/instance/instance.cpp b/src/core/instance/instance.cpp index 4a0bcfea3..2c076ed27 100644 --- a/src/core/instance/instance.cpp +++ b/src/core/instance/instance.cpp @@ -51,7 +51,7 @@ OT_DEFINE_ALIGNED_VAR(gInstanceRaw, sizeof(Instance), uint64_t); #endif -#if OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE +#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE && OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE #define INSTANCE_SIZE_ALIGNED OT_ALIGNED_VAR_SIZE(sizeof(ot::Instance), uint64_t) #define MULTI_INSTANCE_SIZE (OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM * INSTANCE_SIZE_ALIGNED)