On Wed, Dec 18, 2019 at 3:28 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > Naresh pointed out that libbpf builds fail on 32-bit architectures because > rlimit.rlim_cur is defined as 'unsigned long long' on those architectures. > Fix this by using the PRIu64 definition in printf. > > Fixes: dc3a2d254782 ("libbpf: Print hint about ulimit when getting permission denied error") > Reported-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> > Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > --- > tools/lib/bpf/libbpf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c > index 3fe42d6b0c2f..ba31083998ce 100644 > --- a/tools/lib/bpf/libbpf.c > +++ b/tools/lib/bpf/libbpf.c > @@ -117,7 +117,7 @@ static void pr_perm_msg(int err) > return; > > if (limit.rlim_cur < 1024) > - snprintf(buf, sizeof(buf), "%lu bytes", limit.rlim_cur); > + snprintf(buf, sizeof(buf), "%"PRIu64" bytes", limit.rlim_cur); please use %zu and (size_t) cast like the rest of libbpf. Thanks!