mirror of
https://github.com/apache/nuttx.git
synced 2026-09-12 13:40:14 +00:00
fix compiler error
reason:
when CONFIG_CLOCK_TIMEKEEPING=y, compiler error may report
In file included from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/sched.h:42,
from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/arch.h:89,
from boardctl.c:33:
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/irq.h:261:12: error: conflicting types for 'enter_critical_section'; have 'irqstate_t(void)' {aka 'long unsigned int(void)'}
261 | irqstate_t enter_critical_section(void) noinstrument_function;
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/wqueue.h:37,
from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/addrenv.h:39,
from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/sched.h:40:
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/wdog.h:267:11: note: previous implicit declaration of 'enter_critical_section' with type 'int()'
267 | flags = enter_critical_section();
| ^~~~~~~~~~~~~~~~~~~~~~
hujun5@hujun5-OptiPlex-7070:~/downloads1/vela_sim/nuttx$ make -j12
sched/sched_processtimer.c: In function 'nxsched_process_timer':
sched/sched_processtimer.c:178:3: error: implicit declaration of function 'clock_update_wall_time' [-Werror=implicit-function-declaration]
178 | clock_update_wall_time();
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
52b0df1ce6
commit
55dbf37017
2 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
# include <nuttx/board.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CLOCK_TIMEKEEPING
|
||||
# include "clock/clock_timekeeping.h"
|
||||
#endif
|
||||
|
||||
#include "sched/sched.h"
|
||||
#include "wdog/wdog.h"
|
||||
#include "clock/clock.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue