mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
tools lib bpf: Fix compiler warning on CentOS 6
CC libbpf.o cc1: warnings being treated as errors libbpf.c: In function 'bpf_program__title': libbpf.c:1037: error: declaration of 'dup' shadows a global declaration /usr/include/unistd.h:528: error: shadowed declaration is here mv: cannot stat `./.libbpf.o.tmp': No such file or directory make[3]: *** [libbpf.o] Error 1 make[2]: *** [libbpf-in.o] Error 2 make[1]: *** [/linux/tools/lib/bpf/libbpf.a] Error 2 make[1]: *** Waiting for unfinished jobs.... Signed-off-by: Namhyung Kim <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
7a0119468c
commit
715f8db910
2 changed files with 3 additions and 3 deletions
|
|
@ -1034,12 +1034,12 @@ int bpf_program__get_private(struct bpf_program *prog, void **ppriv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
const char *bpf_program__title(struct bpf_program *prog, bool dup)
|
||||
const char *bpf_program__title(struct bpf_program *prog, bool needs_copy)
|
||||
{
|
||||
const char *title;
|
||||
|
||||
title = prog->section_name;
|
||||
if (dup) {
|
||||
if (needs_copy) {
|
||||
title = strdup(title);
|
||||
if (!title) {
|
||||
pr_warning("failed to strdup program title\n");
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ int bpf_program__set_private(struct bpf_program *prog, void *priv,
|
|||
int bpf_program__get_private(struct bpf_program *prog,
|
||||
void **ppriv);
|
||||
|
||||
const char *bpf_program__title(struct bpf_program *prog, bool dup);
|
||||
const char *bpf_program__title(struct bpf_program *prog, bool needs_copy);
|
||||
|
||||
int bpf_program__fd(struct bpf_program *prog);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue