]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libbpf: remove linux/unaligned.h dependency for libbpf_sha256()
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 1 Oct 2025 17:13:26 +0000 (10:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 1 Oct 2025 22:27:25 +0000 (15:27 -0700)
commit4a1c9e544b8dd0c5456e0feb614f427dc46c4835
treea3ff83bce952bf62122303cd3575533e6400aa75
parenta7f36f81d0bde9e274606f771f7bfd59b2c8c083
libbpf: remove linux/unaligned.h dependency for libbpf_sha256()

linux/unaligned.h include dependency is causing issues for libbpf's
Github mirror due to {get,put}_unaligned_be32() usage.

So get rid of it by implementing custom variants of those macros that
will work both in kernel and Github mirror repos.

Also switch round_up() to roundup(), as the former is not available in
Github mirror (and is just a subtly more specific variant of roundup()
anyways).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20251001171326.3883055-6-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
tools/lib/bpf/libbpf_utils.c