Brad Bishop | 23eaf03 | 2019-11-20 05:15:02 -0500 | [diff] [blame^] | 1 | From f231cecc151930fd5b6309da317a8c5bc6001f38 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 3 | Date: Sun, 17 Nov 2019 15:55:54 +0100 |
| 4 | Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 12 | --- |
| 13 | src/terminal.c | 6 ++++++ |
| 14 | 1 file changed, 6 insertions(+) |
| 15 | |
| 16 | diff --git a/src/terminal.c b/src/terminal.c |
| 17 | index d06ce35..6284e4c 100644 |
| 18 | --- a/src/terminal.c |
| 19 | +++ b/src/terminal.c |
| 20 | @@ -47,6 +47,12 @@ |
| 21 | GS_DEFINE_CLEANUP_FUNCTION0(TerminalOptions*, gs_local_options_free, terminal_options_free) |
| 22 | #define gs_free_options __attribute__ ((cleanup(gs_local_options_free))) |
| 23 | |
| 24 | +/* fix for musl */ |
| 25 | +#ifndef W_EXITCODE |
| 26 | +#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) |
| 27 | +#endif |
| 28 | + |
| 29 | + |
| 30 | /* Wait-for-exit helper */ |
| 31 | |
| 32 | typedef struct { |
| 33 | -- |
| 34 | 2.21.0 |
| 35 | |