diff --git a/binfmt/binfmt_exec.c b/binfmt/binfmt_exec.c index b280a26594..b2d0dec37b 100644 --- a/binfmt/binfmt_exec.c +++ b/binfmt/binfmt_exec.c @@ -139,10 +139,12 @@ int exec_spawn(FAR const char *filename, FAR char * const *argv, bin->priority = attr->priority; } +#ifndef CONFIG_BUILD_KERNEL if (attr->stacksize > 0) { bin->stacksize = attr->stacksize; } +#endif } /* Disable pre-emption so that the executed module does