diff --git a/include/app_memory/mem_domain.h b/include/app_memory/mem_domain.h index 72b297b67e9..ebf3e145864 100644 --- a/include/app_memory/mem_domain.h +++ b/include/app_memory/mem_domain.h @@ -27,7 +27,7 @@ typedef struct k_thread *k_tid_t; * @{ */ -#ifdef CONFIG_MEMORY_PROTECTION +#ifdef CONFIG_USERSPACE /** * @def K_MEM_PARTITION_DEFINE * @@ -63,12 +63,7 @@ struct k_mem_partition { /** attribute of memory partition */ k_mem_partition_attr_t attr; }; -#else -/* To support use of IS_ENABLED for the APIs below */ -struct k_mem_partition; -#endif /* CONFIG_MEMORY_PROTECTION */ -#ifdef CONFIG_USERSPACE /** * @brief Memory Domain * @@ -111,6 +106,7 @@ extern struct k_mem_domain k_mem_domain_default; #else /* To support use of IS_ENABLED for the APIs below */ struct k_mem_domain; +struct k_mem_partition; #endif /* CONFIG_USERSPACE */ /**