native,platform: fix compile error on ubuntu 21.10

* The macro SIGSTKSZ expands to a function call in the latest version of
  glibc.
This commit is contained in:
Zihao Yu 2022-03-08 11:14:38 +08:00
parent 89939ad7a2
commit 112799e02a
2 changed files with 2 additions and 1 deletions

View file

@ -48,6 +48,7 @@ static void save_example_context() {
}
static void setup_sigaltstack() {
assert(sizeof(thiscpu->sigstack) == SIGSTKSZ);
stack_t ss;
ss.ss_sp = thiscpu->sigstack;
ss.ss_size = sizeof(thiscpu->sigstack);

View file

@ -20,7 +20,7 @@ typedef struct {
uintptr_t ksp;
int cpuid;
Event ev; // similar to cause register in mips/riscv
uint8_t sigstack[SIGSTKSZ];
uint8_t sigstack[8192];
} __am_cpu_t;
extern __am_cpu_t *__am_cpu_struct;
#define thiscpu __am_cpu_struct