Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1 | From de9639baac792327c701e509258b8a13f6959e82 Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | From: Danilo Spinella <danyspin97@protonmail.com> |
| 3 | Date: Thu, 21 Mar 2019 14:19:26 +0100 |
| 4 | Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 8 | |
| 9 | Upstream-Status: Submitted [1] |
| 10 | |
| 11 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 12 | |
| 13 | [1] https://gitlab.gnome.org/GNOME/vte/issues/72 |
| 14 | |
| 15 | --- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 16 | src/missing.hh | 4 ++++ |
| 17 | src/widget.cc | 1 + |
| 18 | 2 files changed, 5 insertions(+) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 20 | --- a/src/missing.hh |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 21 | +++ b/src/missing.hh |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame^] | 22 | @@ -24,6 +24,10 @@ |
| 23 | #define NSIG (8 * sizeof(sigset_t)) |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 24 | #endif |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame^] | 25 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | +#ifndef W_EXITCODE |
| 27 | +#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) |
| 28 | +#endif |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame^] | 29 | + |
| 30 | #ifndef HAVE_FDWALK |
| 31 | int fdwalk(int (*cb)(void* data, int fd), |
| 32 | void* data); |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 33 | --- a/src/widget.cc |
| 34 | +++ b/src/widget.cc |
| 35 | @@ -21,6 +21,7 @@ |
| 36 | #include "widget.hh" |
| 37 | |
| 38 | #include <sys/wait.h> // for W_EXITCODE |
| 39 | +#include "missing.hh" // for W_EXITCODE on non-glibc systems |
| 40 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 41 | #include <exception> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 42 | #include <new> |