From c53f0c067844dd2582c3df8aa94b54260049f940 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Fri, 15 Sep 2023 14:15:32 +0300 Subject: [PATCH] nuttx/tasks.cpp: Enable ENV unconditionally when CONFIG_BUILD_KERNEL=y --- platforms/nuttx/src/px4/common/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/src/px4/common/tasks.cpp b/platforms/nuttx/src/px4/common/tasks.cpp index ff22f799640a..7d3b65f84ba5 100644 --- a/platforms/nuttx/src/px4/common/tasks.cpp +++ b/platforms/nuttx/src/px4/common/tasks.cpp @@ -66,7 +66,7 @@ int px4_task_spawn_cmd(const char *name, int scheduler, int priority, int stack_ { sched_lock(); -#if !defined(CONFIG_DISABLE_ENVIRON) && !defined(__KERNEL__) +#if !defined(CONFIG_DISABLE_ENVIRON) && !defined(CONFIG_BUILD_KERNEL) /* None of the modules access the environment variables (via getenv() for instance), so delete them * all. They are only used within the startup script, and NuttX automatically exports them to the children * tasks.