aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
blob: 81844d0d665664ccf1dc39c1b442b6e86a75a106 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From 569af712da94637091080943f6a0d69ccb35864e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 14 Sep 2017 23:24:08 -0700
Subject: [PATCH 3/5] Dont include stab.h

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 src/common/stabs_reader.cc          |  1 -
 src/common/stabs_reader.h           | 12 +++++++++++-
 src/common/stabs_reader_unittest.cc |  1 -
 3 files changed, 11 insertions(+), 3 deletions(-)

--- a/src/common/stabs_reader.cc
+++ b/src/common/stabs_reader.cc
@@ -38,7 +38,9 @@
 #include "common/stabs_reader.h"
 
 #include <assert.h>
+#ifdef HAVE_STAB_H
 #include <stab.h>
+#endif
 #include <string.h>
 
 #include <string>
--- a/src/common/stabs_reader.h
+++ b/src/common/stabs_reader.h
@@ -54,6 +54,30 @@
 #elif defined(HAVE_A_OUT_H)
 #include <a.out.h>
 #endif
+// Definitions from <stab.h> and <a.out.h> for systems which
+// do not have them
+#ifndef HAVE_A_OUT_H
+#undef N_UNDF
+#define N_UNDF 0x0
+#ifndef N_FUN
+#define N_FUN 0x24
+#endif
+#ifndef N_SLINE
+#define N_SLINE 0x44
+#endif
+#ifndef N_SO
+#define N_SO 0x64
+#endif
+#ifndef N_LSYM
+#define N_LSYM 0x80
+#endif
+#ifndef N_BINCL
+#define N_BINCL 0x82
+#endif
+#ifndef N_SOL
+#define N_SOL 0x84
+#endif
+#endif
 
 #include <string>
 #include <vector>
--- a/src/common/stabs_reader_unittest.cc
+++ b/src/common/stabs_reader_unittest.cc
@@ -36,7 +36,9 @@
 
 #include <assert.h>
 #include <errno.h>
+#ifdef HAVE_STAB_H
 #include <stab.h>
+#endif
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ fi
 
 AC_SYS_LARGEFILE
 AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h])
+AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h])
 AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create])
 AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes])
 AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes])