summaryrefslogtreecommitdiff
path: root/nuttx/libnx/nxcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/libnx/nxcontext.h')
-rw-r--r--nuttx/libnx/nxcontext.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/nuttx/libnx/nxcontext.h b/nuttx/libnx/nxcontext.h
index ca5e6dcb1..e8b52ece9 100644
--- a/nuttx/libnx/nxcontext.h
+++ b/nuttx/libnx/nxcontext.h
@@ -61,7 +61,9 @@
* mode is supported.
*/
-#if defined(CONFIG_NUTTX_KERNEL) && defined(__KERNEL__)
+#if (defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__)) || \
+ defined(CONFIG_BUILD_KERNEL)
+
# include <nuttx/kmalloc.h>
/* Domain-specific allocations */