mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
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:
1
Makefile
1
Makefile
@ -14,6 +14,7 @@ Q = @
|
||||
endif
|
||||
|
||||
SUBDIRS := encap-forward
|
||||
SUBDIRS += ktrace-CO-RE
|
||||
SUBDIRS += lsm-nobpf
|
||||
SUBDIRS += nat64-bpf
|
||||
SUBDIRS += traffic-pacing-edt
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user