diff options
Diffstat (limited to 'nuttx/libxx/libxx_internal.hxx')
-rw-r--r-- | nuttx/libxx/libxx_internal.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nuttx/libxx/libxx_internal.hxx b/nuttx/libxx/libxx_internal.hxx index 74d5526ce..25ad13c76 100644 --- a/nuttx/libxx/libxx_internal.hxx +++ b/nuttx/libxx/libxx_internal.hxx @@ -52,7 +52,8 @@ // built as separated kernel- and user-space modules, then only the first // 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> # define lib_malloc(s) kmalloc(s) # define lib_zalloc(s) kzalloc(s) |