diff options
author | David Miller <davem@davemloft.net> | 2017-12-19 15:53:11 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-19 19:33:25 -0500 |
commit | 7d9890ef505a8c2a778d304535e26e827d58c466 (patch) | |
tree | ecfdce336b2e383b862054b8a7135578bddbc53f /tools/lib/bpf/libbpf.c | |
parent | 06ef0ccb5a36e1feba9b413ff59a04ecc4407c1c (diff) |
libbpf: Fix build errors.
These elf object pieces are of type Elf64_Xword and therefore could be
"long long" on some builds.
Cast to "long long" and use printf format %lld to deal with this since
we are building with -Werror=format.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5b83875b3594..e9c4b7cabcf2 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c | |||
@@ -910,8 +910,9 @@ bpf_program__collect_reloc(struct bpf_program *prog, GElf_Shdr *shdr, | |||
910 | GELF_R_SYM(rel.r_info)); | 910 | GELF_R_SYM(rel.r_info)); |
911 | return -LIBBPF_ERRNO__FORMAT; | 911 | return -LIBBPF_ERRNO__FORMAT; |
912 | } | 912 | } |
913 | pr_debug("relo for %ld value %ld name %d\n", | 913 | pr_debug("relo for %lld value %lld name %d\n", |
914 | rel.r_info >> 32, sym.st_value, sym.st_name); | 914 | (long long) (rel.r_info >> 32), |
915 | (long long) sym.st_value, sym.st_name); | ||
915 | 916 | ||
916 | if (sym.st_shndx != maps_shndx && sym.st_shndx != text_shndx) { | 917 | if (sym.st_shndx != maps_shndx && sym.st_shndx != text_shndx) { |
917 | pr_warning("Program '%s' contains non-map related relo data pointing to section %u\n", | 918 | pr_warning("Program '%s' contains non-map related relo data pointing to section %u\n", |