From cba1f7a3f623a2ea818b3f678ea75c1326a2de1b Mon Sep 17 00:00:00 2001 From: jackie_wu Date: Mon, 9 Nov 2020 18:27:25 +0800 Subject: [PATCH] fix build error --- bpftrace.spec | 7 +++++-- fix_build_error.patch | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 fix_build_error.patch diff --git a/bpftrace.spec b/bpftrace.spec index d9f9ad8..243e31c 100644 --- a/bpftrace.spec +++ b/bpftrace.spec @@ -1,6 +1,6 @@ Name: bpftrace Version: 0.10.0 -Release: 1 +Release: 2 Summary: High-level tracing language for Linux eBPF License: ASL 2.0 @@ -16,7 +16,7 @@ BuildRequires: zlib-devel llvm-devel clang-devel BuildRequires: bcc-devel >= 0.11.0-2 BuildRequires: libbpf-devel libbpf-static BuildRequires: binutils-devel - +Patch0001: fix_build_error.patch %description bpftrace is a high-level tracing language for Linux enhanced Berkeley Packet @@ -62,5 +62,8 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \ %changelog +* Mon Nov 9 2020 wutao - 0.10.0-2 +- fix build error + * Thu May 07 2020 openEuler Buildteam - 0.10.0-1 - Package init diff --git a/fix_build_error.patch b/fix_build_error.patch new file mode 100644 index 0000000..e5649af --- /dev/null +++ b/fix_build_error.patch @@ -0,0 +1,17 @@ +From b7a8159fcaaeb7d0e2e64c2474f05ca199d970e8 Mon Sep 17 00:00:00 2001 +From: William Findlay +Date: Sun, 21 Jun 2020 13:18:54 -0400 +Subject: [PATCH] Return 0 in detach_kfunc +diff --git a/bpftrace-0.10.0-old/src/attached_probe.cpp b/bpftrace-0.10.0/src/attached_probe.cpp +index 16486b6..8a2f739 100644 +--- a/src/attached_probe.cpp ++++ b/src/attached_probe.cpp +@@ -115,7 +115,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) -- Gitee