aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch
blob: ef722a0e7d3f620cc15c98ec955c2c78c567d65c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From f231cecc151930fd5b6309da317a8c5bc6001f38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sat, 30 Oct 2021 15:10:28 +0200
Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Pending

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 src/terminal.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/terminal.cc b/src/terminal.cc
index 27ee91e..5f4d880 100644
--- 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 {
-- 
2.31.1