summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
blob: 2593ea93eaf1876af504ba4ae285888b28fe1577 (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
83
84
85
86
87
88
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>
---
 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(-)

Index: git/src/common/stabs_reader.cc
===================================================================
--- git.orig/src/common/stabs_reader.cc
+++ git/src/common/stabs_reader.cc
@@ -34,7 +34,9 @@
 #include "common/stabs_reader.h"
 
 #include <assert.h>
+#ifdef HAVE_STAB_H
 #include <stab.h>
+#endif
 #include <string.h>
 
 #include <string>
Index: git/src/common/stabs_reader.h
===================================================================
--- git.orig/src/common/stabs_reader.h
+++ git/src/common/stabs_reader.h
@@ -58,6 +58,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>
Index: git/src/common/stabs_reader_unittest.cc
===================================================================
--- git.orig/src/common/stabs_reader_unittest.cc
+++ git/src/common/stabs_reader_unittest.cc
@@ -33,7 +33,9 @@
 
 #include <assert.h>
 #include <errno.h>
+#ifdef HAVE_STAB_H
 #include <stab.h>
+#endif
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
Index: git/configure.ac
===================================================================
--- git.orig/configure.ac
+++ git/configure.ac
@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
 AC_HEADER_STDC
 AC_SYS_LARGEFILE
 AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h sys/random.h])
+AC_CHECK_HEADERS([a.out.h stab.h sys/random.h])
 AC_CHECK_FUNCS([arc4random getrandom])
 
 AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
OpenPOWER on IntegriCloud