linux_dsm_epyc7002/tools/lib/bpf
Andrey Ignatov 3615353218 libbpf: Fix compile error in libbpf_attach_type_by_name
Arnaldo Carvalho de Melo reported build error in libbpf when clang
version 3.8.1-24 (tags/RELEASE_381/final) is used:

libbpf.c:2201:36: error: comparison of constant -22 with expression of
type 'const enum bpf_attach_type' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
                if (section_names[i].attach_type == -EINVAL)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~
1 error generated.

Fix the error by keeping "is_attachable" property of a program in a
separate struct field instead of trying to use attach_type itself.

Fixes: 956b620fcf ("libbpf: Introduce libbpf_attach_type_by_name")
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-10-31 23:06:17 +01:00
..
.gitignore tools lib bpf: Change FEATURE-DUMP to FEATURE-DUMP.libbpf 2015-11-05 12:47:51 -03:00
bpf.c selftests/bpf: add test cases for queue and stack maps 2018-10-19 13:24:31 -07:00
bpf.h selftests/bpf: add test cases for queue and stack maps 2018-10-19 13:24:31 -07:00
btf.c libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
btf.h libbpf: Per-symbol visibility for DSO 2018-10-16 15:16:47 -07:00
Build Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-09-25 20:29:38 -07:00
libbpf_errno.c libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
libbpf.c libbpf: Fix compile error in libbpf_attach_type_by_name 2018-10-31 23:06:17 +01:00
libbpf.h bpf, libbpf: simplify and cleanup perf ring buffer walk 2018-10-20 23:13:32 -07:00
Makefile libbpf: Per-symbol visibility for DSO 2018-10-16 15:16:47 -07:00
netlink.c libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
nlattr.c libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
nlattr.h libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
str_error.c libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
str_error.h libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00