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

Problem when compile #2

Open
scaetano84 opened this issue Apr 22, 2023 · 0 comments
Open

Problem when compile #2

scaetano84 opened this issue Apr 22, 2023 · 0 comments

Comments

@scaetano84
Copy link

Hi, i have the error when compile. Can add me to discord to view? thank you.
scaetano84#3163

fivem_xdp.c:13:32: error: variable has incomplete type 'struct bpf_map_def'
struct bpf_map_def SEC("maps") rate_limit_map = {
^
fivem_xdp.c:13:8: note: forward declaration of 'struct bpf_map_def'
struct bpf_map_def SEC("maps") rate_limit_map = {
^
fivem_xdp.c:29:17: warning: comparison of distinct pointer types ('struct ethhdr *' and 'void *') [-Wcompare-distinct-pointer-types]
if (eth + 1 > data_end) {
~~~~~~~ ^ ~~~~~~~~
fivem_xdp.c:35:16: warning: comparison of distinct pointer types ('struct iphdr *' and 'void *') [-Wcompare-distinct-pointer-types]
if (ip + 1 > data_end) {
~~~~~~ ^ ~~~~~~~~
fivem_xdp.c:46:17: warning: comparison of distinct pointer types ('struct udphdr *' and 'void *') [-Wcompare-distinct-pointer-types]
if (udp + 1 > data_end) {
~~~~~~~ ^ ~~~~~~~~
fivem_xdp.c:51:22: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration]
if (ip->daddr != htonl(FIVEM_SERVER_IP) || udp->dest != htons(FIVEM_SERVER_PORT)) {
^
fivem_xdp.c:51:61: warning: implicit declaration of function 'htons' is invalid in C99 [-Wimplicit-function-declaration]
if (ip->daddr != htonl(FIVEM_SERVER_IP) || udp->dest != htons(FIVEM_SERVER_PORT)) {

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

No branches or pull requests

1 participant