Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Andrii Nakryiko and committed by
Alexei Starovoitov
fae1b05e 29da17c4

+1 -1
+1 -1
tools/lib/bpf/btf_dump.c
··· 1676 1676 { 1677 1677 __u8 encoding = btf_int_encoding(t); 1678 1678 bool sign = encoding & BTF_INT_SIGNED; 1679 - char buf[16] __aligned(16); 1679 + char buf[16] __attribute__((aligned(16))); 1680 1680 int sz = t->size; 1681 1681 1682 1682 if (sz == 0 || sz > sizeof(buf)) {