summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0002-ast-Add-missing-standard-header-includes.patch
blob: 2d1d0ac5ed0c3fff9b814b57d24d89c122dbf132 (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
From 891071a52e2d5e62634bd6cff249f0d7346e66fa Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 6 Aug 2021 20:14:06 -0700
Subject: [PATCH 2/2] ast: Add missing standard header includes

This fixes build when using libc++ from clang 13
Fixes
src/bpforc.h:40:10: error: no template named 'unordered_map' in nam
espace 'std'
|     std::unordered_map<std::string, std::tuple<uint8_t *, uintptr_t>>;

src/ast/vtable.h:76:30: error: implicit instantiation of undefined
template 'std::basic_string<char>'
|     throw std::runtime_error(std::string("Unknown node: ") + typeid(n).name());
|                              ^

Upstream-Status: Submitted [https://github.com/iovisor/bpftrace/pull/1962]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/ast/bpforc/bpforc.h | 1 +
 src/ast/vtable.h        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/ast/bpforc/bpforc.h b/src/ast/bpforc/bpforc.h
index de0ed0c0..1b929dfd 100644
--- a/src/ast/bpforc/bpforc.h
+++ b/src/ast/bpforc/bpforc.h
@@ -23,6 +23,7 @@
 #endif

 #include <optional>
+#include <unordered_map>

 namespace bpftrace {

diff --git a/src/ast/vtable.h b/src/ast/vtable.h
index 49e0f512..b89e6979 100644
--- a/src/ast/vtable.h
+++ b/src/ast/vtable.h
@@ -4,6 +4,7 @@
 #include <typeindex>
 #include <typeinfo>
 #include <unordered_map>
+#include <string>

 namespace bpftrace {
 namespace ast {
--
2.32.0