summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-09-03 21:16:10 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-09-04 14:35:12 +0200
commit17e54b096e6a8dc92b92c59c2e3437550383b27a (patch)
tree5b834fc3d12e6b5d3a01fec27ce7719958c54f4d /tools
parent95cec14b0308085c028c4d4fb3d09fad3902b4c3 (diff)
libbpf: Fix another __u64 cast in printf
Another issue of __u64 needing either %lu or %llu, depending on the architecture. Fix with cast to `unsigned long long`. Fixes: 7e06aad52929 ("libbpf: Add multi-prog section support for struct_ops") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200904041611.1695163-1-andriin@fb.com
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/bpf/libbpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 47b43c13eee5..53be32a2b9fc 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -8224,7 +8224,7 @@ static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
}
if (sym.st_value % BPF_INSN_SZ) {
pr_warn("struct_ops reloc %s: invalid target program offset %llu\n",
- map->name, (__u64)sym.st_value);
+ map->name, (unsigned long long)sym.st_value);
return -LIBBPF_ERRNO__FORMAT;
}
insn_idx = sym.st_value / BPF_INSN_SZ;