* [PATCH bpf-next] libbpf: fix the use of aligned attribute
@ 2021-10-22 19:25 Andrii Nakryiko
0 siblings, 0 replies; only message in thread
From: Andrii Nakryiko @ 2021-10-22 19:25 UTC (permalink / raw)
To: bpf, ast, daniel; +Cc: andrii, kernel-team
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>
---
tools/lib/bpf/btf_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
--
2.30.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-22 19:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 19:25 [PATCH bpf-next] libbpf: fix the use of aligned attribute Andrii Nakryiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).