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>
*/
#include <stdlib.h>
+#include <strings.h>
#include <memory.h>
#include <unistd.h>
#include <asm/unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#include <errno.h>
#include <linux/err.h>
#include <libgen.h>
#include <inttypes.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>