summaryrefslogtreecommitdiff
blob: fe7ec8b6c96e25ce33cb4550585c9979020a3eb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Fix compilation with glibc-2.34
https://bugs.gentoo.org/803644

In glibc-2.34, definition of SIGSTKSZ has changed from a fixed value
to sysconf(_SC_SIGSTKSZ), which cannot be used in the definition of a
static array. In 2.33, the default SIGSTKSZ was 8192, but apparently
some arches (e.g. aarch64 and sparc) used 16384. Hardcode the larger
of these values.

--- emacs-26.3/src/sysdep.c
+++ emacs-26.3/src/sysdep.c
@@ -1792,7 +1792,7 @@
 
 /* Alternate stack used by SIGSEGV handler below.  */
 
-static unsigned char sigsegv_stack[SIGSTKSZ];
+static unsigned char sigsegv_stack[16384];
 
 
 /* Return true if SIGINFO indicates a stack overflow.  */