Skip to content

Commit 7745ff9

Browse files
anakryikoborkmann
authored andcommitted
libbpf: Fix another __u64 printf warning
Fix yet another printf warning for %llu specifier on ppc64le. This time size_t casting won't work, so cast to verbose `unsigned long long`. Fixes: 166750b ("libbpf: Support libbpf-provided extern variables") Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent b5c7d0d commit 7745ff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/lib/bpf/libbpf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,12 +1129,12 @@ static int set_ext_value_num(struct extern_desc *ext, void *ext_val,
11291129
{
11301130
if (ext->type != EXT_INT && ext->type != EXT_CHAR) {
11311131
pr_warn("extern %s=%llu should be integer\n",
1132-
ext->name, value);
1132+
ext->name, (unsigned long long)value);
11331133
return -EINVAL;
11341134
}
11351135
if (!is_ext_value_in_range(ext, value)) {
11361136
pr_warn("extern %s=%llu value doesn't fit in %d bytes\n",
1137-
ext->name, value, ext->sz);
1137+
ext->name, (unsigned long long)value, ext->sz);
11381138
return -ERANGE;
11391139
}
11401140
switch (ext->sz) {

0 commit comments

Comments
 (0)