libs/libc: fix build break on kernel mode

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-06-06 09:29:53 +08:00
committed by Xiang Xiao
parent 7c5d2a8bdd
commit c1bcf59a85
2 changed files with 4 additions and 4 deletions
+2 -3
View File
@@ -32,13 +32,12 @@ ifeq ($(CONFIG_SMP),y)
CSRCS += sched_cpucount.c
endif
ifneq ($(CONFIG_BUILD_KERNEL),y)
CSRCS += task_startup.c
ifeq ($(CONFIG_SCHED_BACKTRACE),y)
CSRCS += sched_dumpstack.c sched_backtrace.c
endif
ifneq ($(CONFIG_BUILD_KERNEL),y)
CSRCS += task_startup.c
endif # CONFIG_BUILD_KERNEL
# Add the sched directory to the build
+2 -1
View File
@@ -369,7 +369,8 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
goto errout_with_tcb;
}
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
#if defined(CONFIG_ARCH_ADDRENV) && \
defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ARCH_KERNEL_STACK)
/* Allocate the kernel stack */
ret = up_addrenv_kstackalloc(&ptcb->cmn);