blob: 0ffd92b4ba254f823a9979f84541d14f20030149 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001From f78988d3bb5929c857e788a86c7919d6a4ffacc9 Mon Sep 17 00:00:00 2001
2From: Danilo Spinella <danyspin97@protonmail.com>
3Date: Thu, 21 Mar 2019 14:19:26 +0100
4Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems
5
6Upstream-Status: Submitted [1]
7
8Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com>
9
10[1] https://gitlab.gnome.org/GNOME/vte/issues/72
11
12---
13 src/missing.hh | 21 +++++++++++++++++++++
14 src/widget.cc | 1 +
15 2 files changed, 22 insertions(+)
16 create mode 100644 src/missing.hh
17
18diff --git a/src/missing.hh b/src/missing.hh
19new file mode 100644
20index 00000000..1baa993d
21--- /dev/null
22+++ b/src/missing.hh
23@@ -0,0 +1,21 @@
24+/* Copyright 2019 Danilo Spinella
25+ *
26+ * This library is free software; you can redistribute it and/or
27+ * modify it under the terms of the GNU Lesser General Public
28+ * License as published by the Free Software Foundation; either
29+ * version 3 of the License, or (at your option) any later version.
30+ *
31+ * This library is distributed in the hope that it will be useful,
32+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
33+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34+ * Lesser General Public License for more details.
35+ *
36+ * You should have received a copy of the GNU Lesser General Public
37+ * License along with this library; if not, write to the Free Software
38+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
39+ */
40+
41+#ifndef W_EXITCODE
42+#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
43+#endif
44+
45diff --git a/src/widget.cc b/src/widget.cc
46index 331ddba9..555a4adf 100644
47--- a/src/widget.cc
48+++ b/src/widget.cc
49@@ -21,6 +21,7 @@
50 #include "widget.hh"
51
52 #include <sys/wait.h> // for W_EXITCODE
53+#include "missing.hh" // for W_EXITCODE on non-glibc systems
54
55 #include <new>
56 #include <string>
57--
582.21.0
59