summaryrefslogtreecommitdiff
path: root/x11-terms/gnome-terminal/files/gnome-terminal-3.44.1-fix-missing-wexitcode.patch
blob: aff2237db9021705b6dfb6d776ba4d7512eeb7a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
https://gitlab.gnome.org/GNOME/vte/-/issues/72
Someone already tried to upstream a similar patch to gnome vte that
would fix this but was rejected by maintainer. More info can be found
on the link above.

W_EXITCODE is missing in musl thus causing gnome-terminal build to fail.
This patch checks if W_EXITCODE is not defined and then defines it.
--- a/src/terminal.cc
+++ b/src/terminal.cc
@@ -47,6 +47,11 @@
 GS_DEFINE_CLEANUP_FUNCTION0(TerminalOptions*, gs_local_options_free, terminal_options_free)
 #define gs_free_options __attribute__ ((cleanup(gs_local_options_free)))
 
+/* fix for musl */
+#ifndef W_EXITCODE
+#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
+#endif
+
 /* Wait-for-exit helper */
 
 typedef struct {