summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/btf_dump.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-10-22 22:25:02 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-10-23 00:24:36 +0300
commitfae1b05e6f0acf116f6450535b0e1c13051102d3 (patch)
tree085a0f6556cf90027c9e99da955ccb20b511170f /tools/lib/bpf/btf_dump.c
parent29da17c48886543a73866f054f803c7737dee1c6 (diff)
downloadlinux-fae1b05e6f0acf116f6450535b0e1c13051102d3.tar.xz
libbpf: Fix the use of aligned attribute
Building libbpf sources out of kernel tree (in Github repo) we run into compilation error due to unknown __aligned attribute. It must be coming from some kernel header, which is not available to Github sources. Use explicit __attribute__((aligned(16))) instead. Fixes: 961632d54163 ("libbpf: Fix dumping non-aligned __int128") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211022192502.2975553-1-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/btf_dump.c')
-rw-r--r--tools/lib/bpf/btf_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
index e9e5801ece4c..3c19644b5fad 100644
--- a/tools/lib/bpf/btf_dump.c
+++ b/tools/lib/bpf/btf_dump.c
@@ -1676,7 +1676,7 @@ static int btf_dump_int_data(struct btf_dump *d,
{
__u8 encoding = btf_int_encoding(t);
bool sign = encoding & BTF_INT_SIGNED;
- char buf[16] __aligned(16);
+ char buf[16] __attribute__((aligned(16)));
int sz = t->size;
if (sz == 0 || sz > sizeof(buf)) {