From d5bde0bc31a0733a6aec1cd66ff909018a177ff0 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 23 Mar 2026 13:42:47 -0700 Subject: [PATCH] [instance] require `MULTIPLE_INSTANCE_ENABLE` for static instances (#12734) This commit updates the conditional compilation for the multiple static instances array in `Instance`. It adds a check for `OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE` alongside `OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE`. --- src/core/instance/instance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)