ktrace-CO-RE: Adjust for newer libbpf API

‘bpf_program__next’ is deprecated: libbpf v0.7+:
       use bpf_object__next_program() instead

See: https://github.com/libbpf/libbpf/issues/296

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
Jesper Dangaard Brouer
2022-09-02 14:38:06 +02:00
parent def0169f41
commit e70136a68e
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Q = @
endif
SUBDIRS := encap-forward
SUBDIRS += ktrace-CO-RE
SUBDIRS += lsm-nobpf
SUBDIRS += nat64-bpf
SUBDIRS += traffic-pacing-edt

View File

@ -91,7 +91,7 @@ int main(int argc, char **argv)
goto out;
}
prog = bpf_program__next(NULL, obj);
prog = bpf_object__next_program(obj, NULL);
if (!prog) {
pr_err("No program!\n");
err = -ENOENT;