]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ebpf: avoid need of 32 bit header
authorEric Leblond <eric@regit.org>
Mon, 28 Dec 2020 08:41:09 +0000 (09:41 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Fri, 5 Feb 2021 11:06:33 +0000 (16:36 +0530)
Compilation of xdp_lb.c was failing in some case with the following
error:

/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found

This patch add some define to be able to skip recursive inclusion of
header files leading to the problem.

(cherry picked from commit dfe5785bfa630905ae52267baeae5453231f9b2d)

ebpf/xdp_lb.c

index 2ee924572d6700d70090c6c85d276cc893d3bc79..dc1d8660c4dff8ea6f83060edb063b0035b16c2b 100644 (file)
@@ -23,6 +23,9 @@
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
 #include <linux/if_vlan.h>
+/* Workaround to avoid the need of 32bit headers */
+#define _LINUX_IF_H
+#define IFNAMSIZ 16
 #include <linux/if_tunnel.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>