summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
blob: 4f64dea25494f708f103f31befe0ac6a11e5fa30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From d3f240b38eed7cd08f6c50ea896572f1327b437a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:31:40 -0700
Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN

Define W_STOPCODE if not defined already

__SIGRTMIN is internal to glibc and other libcs e.g. musl
may not provide them

Fixes
https://sourceware.org/bugzilla/show_bug.cgi?id=13012

Upstream-Status: Submitted

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 gdb/linux-nat.c     | 4 ++--
 gdb/nat/linux-nat.h | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 8b29245c3d..f424ae9711 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -5021,6 +5021,6 @@ lin_thread_get_thread_signals (sigset_t *set)
   /* NPTL reserves the first two RT signals, but does not provide any
      way for the debugger to query the signal numbers - fortunately
      they don't change.  */
-  sigaddset (set, __SIGRTMIN);
-  sigaddset (set, __SIGRTMIN + 1);
+  sigaddset (set, SIGRTMIN);
+  sigaddset (set, SIGRTMIN + 1);
 }
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index 7dd18fefff..35137ab34f 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
 
 extern int lwp_is_stepping (struct lwp_info *lwp);
 
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
 #endif /* LINUX_NAT_H */
-- 
2.13.1