libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
PATCH 1/1 libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
Where that macro isn't available.
Cc Alexei Starovoitov <[email protected]>
Cc Andrii Nakryiko <[email protected]>
Cc Jiri Olsa <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/lib/bpf/libbpf_internal.h | 5 +++++ 1 file changed, 5 insertions(+)
tools/lib/bpf/libbpf_internal.h +5 -0
@@ -41,6 +41,11 @@#define ELF_C_READ_MMAP ELF_C_READ#endif +/* Older libelf all end up in this expression, for both 32 and 64 bit */ +#ifndef GELF_ST_VISIBILITY +#define GELF_ST_VISIBILITY (o) ((o) & 0x03) +#endif +#define BTF_INFO_ENC (kind, kind_flag, vlen) \ ((!!(kind_flag) << 31) | ((kind) << 24) | ((vlen) & BTF_MAX_VLEN))#define BTF_TYPE_ENC (name, info, size_or_type) (name), (info), (size_or_type)
Signature · 1 line
2.26.3
This patch was applied to bpf/bpf.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
Quoted 8 lines · On Sat, 8 May 2021 12:22:12 -0300 you wrote:
Where that macro isn't available.
Cc Alexei Starovoitov <[email protected]>Cc Andrii Nakryiko <[email protected]>Cc Jiri Olsa <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>[...]
Here is the summary with links:
- [1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
https://git.kernel.org/bpf/bpf/c/67e7ec0bd453
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html