mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 10:38:40 +08:00
libs/libc: fix build break on kernel mode
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user