cpu/native: fix build with gcc 11
This fixes the following warning with GCC 11.2:
cpu/native/include/native_internal.h:153:13: error: variably modified ‘__isr_stack’ at file scope
153 | extern char __isr_stack[SIGSTKSZ];
| ^~~~~~~~~~~
cpu/native/include/native_internal.h:154:13: error: variably modified ‘__end_stack’ at file scope
154 | extern char __end_stack[SIGSTKSZ];
This commit is contained in:
parent
94c852cfa7
commit
1a2984b786
@ -150,8 +150,8 @@ extern volatile int _native_sigpend;
|
||||
extern volatile int _native_in_isr;
|
||||
extern volatile int _native_in_syscall;
|
||||
|
||||
extern char __isr_stack[SIGSTKSZ];
|
||||
extern char __end_stack[SIGSTKSZ];
|
||||
extern char __isr_stack[];
|
||||
extern char __end_stack[];
|
||||
extern ucontext_t native_isr_context;
|
||||
extern ucontext_t end_context;
|
||||
extern ucontext_t *_native_cur_ctx, *_native_isr_ctx;
|
||||
|
||||
@ -170,7 +170,7 @@ void cpu_switch_context_exit(void)
|
||||
irq_disable();
|
||||
_native_in_isr = 1;
|
||||
native_isr_context.uc_stack.ss_sp = __isr_stack;
|
||||
native_isr_context.uc_stack.ss_size = sizeof(__isr_stack);
|
||||
native_isr_context.uc_stack.ss_size = SIGSTKSZ;
|
||||
native_isr_context.uc_stack.ss_flags = 0;
|
||||
makecontext(&native_isr_context, isr_cpu_switch_context_exit, 0);
|
||||
if (setcontext(&native_isr_context) == -1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user