Commit 62b8cea6 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

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: default avatarAndrii Nakryiko <andriin@fb.com>
Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 71bd106d
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <strings.h>
#include <memory.h> #include <memory.h>
#include <unistd.h> #include <unistd.h>
#include <asm/unistd.h> #include <asm/unistd.h>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strings.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <linux/err.h> #include <linux/err.h>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <libgen.h> #include <libgen.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <strings.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment