Latest release [1.2.5] fails to compile
eolder opened this issue · comments
Hello, I've downloaded the latest 1.2.5 release and I'm getting this compilation error:
.../xdp-tools-1.2.5 $ make
lib
libxdp
CC staticobjs/libxdp.o
libxdp.c: In function ‘xdp_get_ifindex_prog_id’:
libxdp.c:2032:24: error: ‘xdp_info’ undeclared (first use in this function); did you mean ‘xinfo’?
2032 | _drv_prog_id = xdp_info.drv_prog_id;
| ^~~~~~~~
| xinfo
libxdp.c:2032:24: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:91: staticobjs/libxdp.o] Error 1
make[1]: *** [Makefile:20: libxdp] Error 2
make: *** [Makefile:25: lib] Error 2
Which is resolved by the following patch:
--- ./lib/libxdp/libxdp.c 2022-07-03 12:03:08.000000000 -0400
+++ - 2022-07-07 10:34:59.991408924 -0400
@@ -2029,10 +2029,10 @@
if (err)
return err;
- _drv_prog_id = xdp_info.drv_prog_id;
- _skb_prog_id = xdp_info.skb_prog_id;
- _hw_prog_id = xdp_info.hw_prog_id;
- _attach_mode = xdp_info.attach_mode;
+ _drv_prog_id = xinfo.drv_prog_id;
+ _skb_prog_id = xinfo.skb_prog_id;
+ _hw_prog_id = xinfo.hw_prog_id;
+ _attach_mode = xinfo.attach_mode;
#endif
switch (_attach_mode) {
case XDP_ATTACHED_SKB:
Closed by #208