]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fix build with glibc-2.34
authorLiu Zixian <hdu_sdlzx@163.com>
Mon, 27 Jun 2022 08:07:16 +0000 (16:07 +0800)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Mon, 29 Aug 2022 12:37:59 +0000 (15:37 +0300)
SIGTSKSZ is no long a constant after glibc 2.34
https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html

tools/hscollider/sig.cpp

index bb00185d6b540a93c873a1a6bed51dd96e43864f..d2e221b53918f11032378fbe3f8232acf7161189 100644 (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;