diff options
author | Andrey Ignatov <rdna@fb.com> | 2018-10-31 12:57:18 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-31 23:06:17 +0100 |
commit | 3615353218744bb60f55170c620ce4dce1a008c7 (patch) | |
tree | fd8df6356914077abfcfe6434ae664de3ba32b1a /include | |
parent | deee2cae27d1914850195e3fb219cc611e953560 (diff) |
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: 956b620fcf0b ("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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions