Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compile xdp-forward fail #439

Closed
wants to merge 1 commit into from
Closed

Conversation

calcky
Copy link
Contributor

@calcky calcky commented Sep 12, 2024

OS: ubuntu2204.localdomain 5.15.0-91-generic
compile error:

xdp-forward.c: In function ‘do_load’:
xdp-forward.c:139:24: error: implicit declaration of function ‘bpf_object__next_program’; did you mean ‘bpf_object__unpin_programs’? [-Werror=implicit-function-declaration]
139 | while ((prog = bpf_object__next_program(skel->obj, prog)) != NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
| bpf_object__unpin_programs
xdp-forward.c:139:22: error: assignment to ‘struct bpf_program *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
139 | while ((prog = bpf_object__next_program(skel->obj, prog)) != NULL)
| ^
xdp-forward.c:140:21: error: implicit declaration of function ‘bpf_program__type’; did you mean ‘bpf_program__size’? [-Werror=implicit-function-declaration]
140 | if (bpf_program__type(prog) == BPF_PROG_TYPE_XDP &&
| ^~~~~~~~~~~~~~~~~
| bpf_program__size
xdp-forward.c:141:21: error: implicit declaration of function ‘bpf_program__expected_attach_type’; did you mean ‘bpf_program__set_expected_attach_type’? [-Werror=implicit-function-declaration]
141 | bpf_program__expected_attach_type(prog) == BPF_XDP)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_program__set_expected_attach_type
cc1: all warnings being treated as errors
make[1]: *** [../lib/common.mk:107: xdp-forward] Error 1
make: *** [Makefile:40: xdp-forward] Error 2

@calcky calcky closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant