aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2019-02-07 19:29:24 +0000
committerAlexei Starovoitov <[email protected]>2019-02-08 02:18:42 +0000
commit62b8cea62e8bad0511260faab8e8de04c76a69af (patch)
tree41c10dbd721922c2a4f909650fd0d240836349e0 /tools/lib/bpf/bpf.c
parentnet: fixed-phy: Add fixed_phy_register_with_gpiod() API (diff)
downloadkernel-62b8cea62e8bad0511260faab8e8de04c76a69af.tar.gz
kernel-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 <[email protected]> Reported-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/bpf.c')
-rw-r--r--tools/lib/bpf/bpf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 3defad77dc7a..92fd27fe0599 100644
--- a/tools/lib/bpf/bpf.c
+++ b/tools/lib/bpf/bpf.c
@@ -22,6 +22,7 @@
*/
#include <stdlib.h>
+#include <strings.h>
#include <memory.h>
#include <unistd.h>
#include <asm/unistd.h>