backporting

This commit is contained in:
zhang-mingyi66 2023-01-29 14:51:45 +08:00
parent 101e0389fb
commit 41482aa641
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From f15814c93ade62519c9ccb50a8ca5c8998010ac2 Mon Sep 17 00:00:00 2001
From: Ian Rogers <irogers@google.com>
Date: Wed, 13 Jan 2021 14:36:08 -0800
Subject: [PATCH] bpf, libbpf: Avoid unused function warning on
bpf_tail_call_static
Add inline to __always_inline making it match the linux/compiler.h.
Adding this avoids an unused function warning on bpf_tail_call_static
when compining with -Wall.
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210113223609.3358812-1-irogers@google.com
---
src/bpf_helpers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bpf_helpers.h b/src/bpf_helpers.h
index 72b25111..ae6c975e 100644
--- a/src/bpf_helpers.h
+++ b/src/bpf_helpers.h
@@ -30,7 +30,7 @@
#define SEC(NAME) __attribute__((section(NAME), used))
#ifndef __always_inline
-#define __always_inline __attribute__((always_inline))
+#define __always_inline inline __attribute__((always_inline))
#endif
#ifndef __noinline
#define __noinline __attribute__((noinline))

View File

@ -4,7 +4,7 @@
Name: %{githubname}
Version: %{githubver}
Release: 3
Release: 4
Summary: Libbpf library
License: LGPLv2 or BSD
@ -17,6 +17,7 @@ Patch6001: backport-libbpf-Ensure-functions-with-always_inline-attribute-are-inl
Patch6002: backport-libbpf-Fix-the-name-of-a-reused-map.patch
Patch6003: backport-libbpf-preserve-errno-across-pr_warn-pr_info-pr_debug.patch
Patch6004: backport-libbpf-Fix-determine_ptr_size-guessing.patch
Patch6005: backport-libbpf-Avoid-unused-function-warning-on-bpf_tail_call_static.patch
# This package supersedes libbpf from kernel-tools,
# which has default Epoch: 0. By having Epoch: 1
@ -68,6 +69,9 @@ developing applications that use %{name}
%{_libdir}/libbpf.a
%changelog
* Sun Jan 29 2023 zhangmingyi <zhangmingyi5@huawei.com> - 2:0.3-4
- backporting: Avoid unused function warning on bpf_tail_call_static
* Wed Jan 18 2023 zhangmingyi <zhangmingyi5@huawei.com> - 2:0.3-3
- Fix determine_ptr_size() guessing