fix build with glibc-2.34

SIGTSKSZ is no long a constant after glibc 2.34
https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
This commit is contained in:
Liu Zixian 2022-06-27 16:07:16 +08:00 committed by Konstantinos Margaritis
parent 70b2a28386
commit c597f69c59

View File

@ -38,6 +38,7 @@
#if defined(HAVE_SIGACTION)
#include <signal.h>
#define STACK_SIZE 8192
#endif
#ifdef HAVE_BACKTRACE
@ -166,7 +167,7 @@ void installSignalHandler(void) {
}
#ifdef HAVE_SIGALTSTACK
static TLS_VARIABLE char alt_stack_loc[SIGSTKSZ];
static TLS_VARIABLE char alt_stack_loc[STACK_SIZE];
#endif
void setSignalStack(void) {
@ -178,7 +179,7 @@ void setSignalStack(void) {
stack_t alt_stack;
memset(&alt_stack, 0, sizeof(alt_stack));
alt_stack.ss_flags = 0;
alt_stack.ss_size = SIGSTKSZ;
alt_stack.ss_size = STACK_SIZE;
alt_stack.ss_sp = alt_stack_loc;
if (!sigaltstack(&alt_stack, nullptr)) {
act.sa_flags |= SA_ONSTACK;