blob: 5f0c096939fb6c33437966b125f6e4a4ea989235 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 2f97e89e9e4e5797d0d973e1d05c1f44c46b4912 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 5 Jun 2015 20:21:38 -0700
4Subject: [PATCH] Use exorted definitions of SIGRTMIN
5
6Define W_STOPCODE if not defined already
7
8__SIGRTMIN is internal to glibc and other libcs e.g. musl
9may not provide them
10
11Fixes
12https://sourceware.org/bugzilla/show_bug.cgi?id=13012
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16Upstream-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
22diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
23index 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);
39diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
40index 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--
532.1.4
54