]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix printing of ulimit value
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 19 Dec 2019 09:02:36 +0000 (10:02 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Dec 2019 15:25:52 +0000 (16:25 +0100)
commit0d81d3b093c6589d792c34ad63f3558cd74e572d
tree975c0b1f3f3994d6d75065840ba80c6f52456efe
parent3fe5c57bded3e32cb901ef1c039e90cb0823dcdc
libbpf: Fix printing of ulimit value

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 %zu in printf and casting to size_t.

Fixes: 9a7cc7733ab1 ("libbpf: Print hint about ulimit when getting permission denied error")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191219090236.905059-1-toke@redhat.com
tools/lib/bpf/libbpf.c