summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorKaelyn Takata <kaelyn.alexi@protonmail.com>2023-04-27 17:38:46 +0000
committerLudovic Courtès <ludo@gnu.org>2023-05-19 16:46:34 +0200
commit8c302c2e261bdba06d7b077aaf1bf1712ded2f40 (patch)
tree472f60377cfb7e11fb6c21ae35d290d1f4ad7b67 /gnu/packages/patches
parente637794875c32cfa90c135558666be0acda24747 (diff)
downloadguix-8c302c2e261bdba06d7b077aaf1bf1712ded2f40.tar.gz
gnu: openmw: Fix build on glibc 2.34 and newer.
* gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/game-development.scm (openmw)[source]<patches>: Use it here.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch b/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch
new file mode 100644
index 0000000000..ed35563c2c
--- /dev/null
+++ b/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch
@@ -0,0 +1,39 @@
+From 98a7d90ee258ceef9c70b0b2955d0458ec46f048 Mon Sep 17 00:00:00 2001
+From: elsid <elsid.mail@gmail.com>
+Date: Fri, 24 Sep 2021 19:40:29 +0200
+Subject: [PATCH] Assume SIGSTKSZ is not a constant
+
+SIGSTKSZ is not defined as constant since glibc 2.34:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53
+---
+ components/crashcatcher/crashcatcher.cpp | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp
+index 86571e1e3a..c828e1ca81 100644
+--- a/components/crashcatcher/crashcatcher.cpp
++++ b/components/crashcatcher/crashcatcher.cpp
+@@ -56,8 +56,6 @@ static const char exec_err[] = "!!! Failed to exec debug process\n";
+
+ static char argv0[PATH_MAX];
+
+-static char altstack[SIGSTKSZ];
+-
+
+ static struct {
+     int signum;
+@@ -475,9 +473,10 @@ int crashCatcherInstallHandlers(int argc, char **argv, int num_signals, int *sig
+
+     /* Set an alternate signal stack so SIGSEGVs caused by stack overflows
+      * still run */
++    static char* altstack = new char [SIGSTKSZ];
+     altss.ss_sp = altstack;
+     altss.ss_flags = 0;
+-    altss.ss_size = sizeof(altstack);
++    altss.ss_size = SIGSTKSZ;
+     sigaltstack(&altss, nullptr);
+
+     memset(&sa, 0, sizeof(sa));
+--
+GitLab
+