commit: 9071888928b0b9d61e061fea79e4bd8f60eeab01
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 20 19:21:58 2020 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Sat Jun 20 19:21:58 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90718889
dev-util/bpftrace-0.10.0-r1: Fix build with bcc-0.15.0
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-util/bpftrace/bpftrace-0.10.0-r1.ebuild | 2 ++
.../files/bpftrace-0.10.0-no-bpf_detach_kfunc.patch | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/dev-util/bpftrace/bpftrace-0.10.0-r1.ebuild
b/dev-util/bpftrace/bpftrace-0.10.0-r1.ebuild
index 196615ab2a9..26c1753afef 100644
--- a/dev-util/bpftrace/bpftrace-0.10.0-r1.ebuild
+++ b/dev-util/bpftrace/bpftrace-0.10.0-r1.ebuild
@@ -45,6 +45,8 @@ PATCHES=(
"${FILESDIR}/bpftrace-0.10.0-install-libs.patch"
"${FILESDIR}/bpftrace-0.10.0-dont-compress-man.patch"
"${FILESDIR}/bpftrace-0.10.0-llvm-multi.patch"
+ # bpf_detach_kfunc has always been a noop
+ "${FILESDIR}/bpftrace-0.10.0-no-bpf_detach_kfunc.patch"
)
# lots of fixing needed
diff --git a/dev-util/bpftrace/files/bpftrace-0.10.0-no-bpf_detach_kfunc.patch
b/dev-util/bpftrace/files/bpftrace-0.10.0-no-bpf_detach_kfunc.patch
new file mode 100644
index 00000000000..145fb1c0ca9
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.10.0-no-bpf_detach_kfunc.patch
@@ -0,0 +1,13 @@
+diff --git a/src/attached_probe.cpp b/src/attached_probe.cpp
+index c7e789e..08f657e 100644
+--- a/src/attached_probe.cpp
++++ b/src/attached_probe.cpp
+@@ -116,7 +116,7 @@ void AttachedProbe::attach_kfunc(void)
+ int AttachedProbe::detach_kfunc(void)
+ {
+ close(tracing_fd_);
+- return bpf_detach_kfunc(progfd_, NULL);
++ return 0;
+ }
+ #else
+ void AttachedProbe::attach_kfunc(void)