OSDN Git Service

tools/bpf: add missing strings.h include
authorAndrii Nakryiko <andriin@fb.com>
Thu, 7 Feb 2019 19:29:24 +0000 (11:29 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 8 Feb 2019 02:18:42 +0000 (18:18 -0800)
commit62b8cea62e8bad0511260faab8e8de04c76a69af
tree41c10dbd721922c2a4f909650fd0d240836349e0
parent71bd106d2567675668e253cba3960e3c4bf2e80e
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>
tools/lib/bpf/bpf.c
tools/lib/bpf/btf.c
tools/lib/bpf/libbpf.c