Skip to content

Commit b11c1bd

Browse files
Bojun-Seoekyooo
authored andcommitted
libbpf-tools/runqlen: Fix compile error on ppc64el
The compile error is caused by a type mismatch between u64 and `unsigned long long`. This patch explicitly casts the `samples` variable to `unsigned long long` to resolve the issue #5332.
1 parent 7457228 commit b11c1bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libbpf-tools/runqlen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static void print_runq_occupancy(struct runqlen_bpf__bss *bss)
196196
queued += val;
197197
}
198198
samples = idle + queued;
199-
runqocc = queued * 1.0 / max(1ULL, samples);
199+
runqocc = queued * 1.0 / max(1ULL, (unsigned long long)samples);
200200
if (env.per_cpu)
201201
printf("runqocc, CPU %-3d %6.2f%%\n", i,
202202
100 * runqocc);

0 commit comments

Comments
 (0)