]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix compilation warnings for 64-bit printf args
authorAndrii Nakryiko <andriin@fb.com>
Thu, 27 Aug 2020 04:11:09 +0000 (21:11 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 27 Aug 2020 05:13:38 +0000 (22:13 -0700)
commit5e37aad4236ce42c5d1d03ca3e142b9bb50fb666
tree74f743dc3b07ecfd4ddd563b9ebd658d28c603fe
parentf449b3139059f874385952966894f0fd75ccdc15
libbpf: Fix compilation warnings for 64-bit printf args

Fix compilation warnings due to __u64 defined differently as `unsigned long`
or `unsigned long long` on different architectures (e.g., ppc64le differs from
x86-64). Also cast one argument to size_t to fix printf warning of similar
nature.

Fixes: a59d3b00c5f8 ("libbpf: Implement enum value-based CO-RE relocations")
Fixes: a84f3b04bd2e ("libbpf: Skip well-known ELF sections when iterating ELF")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200827041109.3613090-1-andriin@fb.com
tools/lib/bpf/libbpf.c