Actions
Support #3052
closedutil-ebpf.c compile error
Status:
Closed
Priority:
Normal
Assignee:
-
Affected Versions:
Label:
Description
System is Ubuntu 18.04.2 using kernel 4.18.0-22-generic.
compiled and installed the latest libbpf headers from git repo.
While trying to compile the latest git repo of suricata I get the following error:
CC util-ebpf.o
util-ebpf.c:359:13: error: implicit declaration of function 'bpf_program__set_ifindex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bpf_program__set_ifindex(bpfprog, ifindex);
^
util-ebpf.c:359:13: warning: this function declaration is not a prototype [-Wstrict-prototypes]
util-ebpf.c:362:13: error: implicit declaration of function 'bpf_map__set_ifindex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bpf_map__set_ifindex(map, ifindex);
^
util-ebpf.c:362:13: note: did you mean 'bpf_map__set_priv'?
/usr/local/include/bpf/libbpf.h:244:5: note: 'bpf_map__set_priv' declared here
int bpf_map__set_priv(struct bpf_map *map, void *priv,
^
util-ebpf.c:362:13: warning: this function declaration is not a prototype [-Wstrict-prototypes]
bpf_map__set_ifindex(map, ifindex);
^
2 warnings and 2 errors generated.
Makefile:1752: recipe for target 'util-ebpf.o' failed
Config string is:
CC=clang ./configure --prefix=/usr/ --sysconfdir=/etc/ --localstatedir=/var/ --with-libnss-libraries=/usr/lib --with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib --with-libnspr-includes=/usr/include/nspr --enable-geoip --enable-luajit --enable-rust --enable-ebpf --enable-ebpf-build
Actions