Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 2f97e89e9e4e5797d0d973e1d05c1f44c46b4912 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 5 Jun 2015 20:21:38 -0700 |
| 4 | Subject: [PATCH] Use exorted definitions of SIGRTMIN |
| 5 | |
| 6 | Define W_STOPCODE if not defined already |
| 7 | |
| 8 | __SIGRTMIN is internal to glibc and other libcs e.g. musl |
| 9 | may not provide them |
| 10 | |
| 11 | Fixes |
| 12 | https://sourceware.org/bugzilla/show_bug.cgi?id=13012 |
| 13 | |
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 15 | --- |
| 16 | Upstream-Status: Submitted |
| 17 | |
| 18 | gdb/linux-nat.c | 4 ++-- |
| 19 | gdb/nat/linux-nat.h | 4 ++++ |
| 20 | 2 files changed, 6 insertions(+), 2 deletions(-) |
| 21 | |
| 22 | diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c |
| 23 | index 396c30c..50320ee 100644 |
| 24 | --- a/gdb/linux-nat.c |
| 25 | +++ b/gdb/linux-nat.c |
| 26 | @@ -4856,10 +4856,10 @@ lin_thread_get_thread_signals (sigset_t *set) |
| 27 | fortunately they don't change! */ |
| 28 | |
| 29 | if (restart == 0) |
| 30 | - restart = __SIGRTMIN; |
| 31 | + restart = SIGRTMIN; |
| 32 | |
| 33 | if (cancel == 0) |
| 34 | - cancel = __SIGRTMIN + 1; |
| 35 | + cancel = SIGRTMIN + 1; |
| 36 | |
| 37 | sigaddset (set, restart); |
| 38 | sigaddset (set, cancel); |
| 39 | diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h |
| 40 | index 83a6d91..efbe0fd 100644 |
| 41 | --- a/gdb/nat/linux-nat.h |
| 42 | +++ b/gdb/nat/linux-nat.h |
| 43 | @@ -25,4 +25,8 @@ |
| 44 | instead SIGTRAP with bit 7 set. */ |
| 45 | #define SYSCALL_SIGTRAP (SIGTRAP | 0x80) |
| 46 | |
| 47 | +#ifndef W_STOPCODE |
| 48 | +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) |
| 49 | +#endif |
| 50 | + |
| 51 | #endif /* LINUX_NAT_H */ |
| 52 | -- |
| 53 | 2.1.4 |
| 54 | |