summaryrefslogtreecommitdiff
path: root/dev-util/bpftrace/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
commit9c417bacd51da6d8b57fa9f37425161d30d4b95b (patch)
tree47c9d6e4243f39a1f48afd54c969b65b00a5c649 /dev-util/bpftrace/files
parentd934827bf44b7cfcf6711964418148fa60877668 (diff)
gentoo resync : 28.11.2020
Diffstat (limited to 'dev-util/bpftrace/files')
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.11.4-old-kernels.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-util/bpftrace/files/bpftrace-0.11.4-old-kernels.patch b/dev-util/bpftrace/files/bpftrace-0.11.4-old-kernels.patch
new file mode 100644
index 000000000000..831de6487a84
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.11.4-old-kernels.patch
@@ -0,0 +1,28 @@
+diff --git a/src/btf.h b/src/btf.h
+index 61579a3..4e9f9fc 100644
+--- a/src/btf.h
++++ b/src/btf.h
+@@ -2,6 +2,7 @@
+
+ #include "types.h"
+ #include <linux/types.h>
++#include <linux/version.h>
+ #include <map>
+ #include <regex>
+ #include <string>
+@@ -11,6 +12,15 @@
+ struct btf;
+ struct btf_type;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0)
++/* this is required to build with 5.4 and earlier kernel headers */
++enum btf_func_linkage {
++ BTF_FUNC_STATIC = 0,
++ BTF_FUNC_GLOBAL = 1,
++ BTF_FUNC_EXTERN = 2,
++};
++#endif
++
+ namespace bpftrace {
+
+ class BTF