diff options
author | David Miller <davem@davemloft.net> | 2018-11-28 12:56:10 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-11-28 16:10:59 -0800 |
commit | 1ad93ab10e24856ea1ae9f0fd3352992afa67e1b (patch) | |
tree | 46c8b8640085ccfe8c8942a7daaf19a89eaf2cfa /tools/lib | |
parent | 295daee4ba108a025b9ac66231b0700e18ff5315 (diff) |
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')
-rw-r--r-- | tools/lib/bpf/btf.c | 2 |
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; |