From: Yufen Yu yuyufen@huawei.com
hulk inclusion category: feature bugzilla: NA CVE: NA
-------------------------------------------------
This patch tries to fix follow gcc error:
libbpf.c: In function ‘bpf_prog_type__needs_kver’: libbpf.c:1495:2: error: enumeration value ‘BPF_PROG_TYPE_FLOW_DISSECTOR’ not handled in switch [-Werror=switch-enum] 1495 | switch (type) { | ^~~~~~ libbpf.c:1495:2: error: enumeration value ‘BPF_PROG_TYPE_CGROUP_SYSCTL’ not handled in switch [-Werror=switch-enum] cc1: all warnings being treated as errors mv: cannot stat './.libbpf.o.tmp': No such file or directory
Fixes: 4635b0ae4d26 ("tools: sync bpf.h") Signed-off-by: Yufen Yu yuyufen@huawei.com Reviewed-by: Hou Tao houtao1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 64056dcecf71d..4c87f82dc2a6a 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -1510,6 +1510,8 @@ static bool bpf_prog_type__needs_kver(enum bpf_prog_type type) case BPF_PROG_TYPE_CGROUP_SOCK_ADDR: case BPF_PROG_TYPE_LIRC_MODE2: case BPF_PROG_TYPE_SK_REUSEPORT: + case BPF_PROG_TYPE_FLOW_DISSECTOR: + case BPF_PROG_TYPE_CGROUP_SYSCTL: return false; case BPF_PROG_TYPE_UNSPEC: case BPF_PROG_TYPE_KPROBE: