aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/btf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-02-07 11:29:24 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-02-07 18:18:42 -0800
commit62b8cea62e8bad0511260faab8e8de04c76a69af (patch)
tree41c10dbd721922c2a4f909650fd0d240836349e0 /tools/lib/bpf/btf.c
parentnet: fixed-phy: Add fixed_phy_register_with_gpiod() API (diff)
downloadlinux-dev-62b8cea62e8bad0511260faab8e8de04c76a69af.tar.xz
linux-dev-62b8cea62e8bad0511260faab8e8de04c76a69af.zip
tools/bpf: add missing strings.h include
Few files in libbpf are using bzero() function (defined in strings.h header), but don't include corresponding header. When libbpf is added as a dependency to pahole, this undeterministically causes warnings on some machines: bpf.c:225:2: warning: implicit declaration of function 'bzero' [-Wimplicit-function-declaration] bzero(&attr, sizeof(attr)); ^~~~~ Signed-off-by: Andrii Nakryiko <andriin@fb.com> Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/btf.c')
-rw-r--r--tools/lib/bpf/btf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index ab6528c935a1..4324eb47d214 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#include <errno.h>
#include <linux/err.h>