aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2018-11-28 12:56:10 -0800
committerAlexei Starovoitov <ast@kernel.org>2018-11-28 16:10:59 -0800
commit1ad93ab10e24856ea1ae9f0fd3352992afa67e1b (patch)
tree46c8b8640085ccfe8c8942a7daaf19a89eaf2cfa /tools/lib/bpf
parentselftests/bpf: add config fragment CONFIG_FTRACE_SYSCALLS (diff)
downloadlinux-dev-1ad93ab10e24856ea1ae9f0fd3352992afa67e1b.tar.xz
linux-dev-1ad93ab10e24856ea1ae9f0fd3352992afa67e1b.zip
bpf: Fix various lib and testsuite build failures on 32-bit.
Cannot cast a u64 to a pointer on 32-bit without an intervening (long) cast otherwise GCC warns. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf')
-rw-r--r--tools/lib/bpf/btf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index eadcf8dfd295..c2d641f3e16e 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -466,7 +466,7 @@ int btf__get_from_id(__u32 id, struct btf **btf)
goto exit_free;
}
- *btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL);
+ *btf = btf__new((__u8 *)(long)btf_info.btf, btf_info.btf_size, NULL);
if (IS_ERR(*btf)) {
err = PTR_ERR(*btf);
*btf = NULL;