package/vde2: fix build with BR2_OPTIMIZE_0
Fix the following build failure with BR2_OPTIMIZE_0: /home/autobuild/autobuild/instance-11/output-1/host/lib/gcc/mips64-buildroot-linux-uclibc/10.3.0/../../../../mips64-buildroot-linux-uclibc/bin/ld: vde_l3.o: in function `ip_output_ready': vde_l3.c:(.text+0xb30): undefined reference to `iphead' Fixes: - http://autobuild.buildroot.org/results/5eeefcdac0b8974a424a885fdc2e82f7cb4b617d Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
2945215624
commit
68ef4e546d
@ -0,0 +1,37 @@
|
||||
vde_l3: Add static to inline functions
|
||||
|
||||
Add static to inline functions to avoid the following build failure
|
||||
with BR2_OPTIMIZE_0:
|
||||
|
||||
/home/autobuild/autobuild/instance-11/output-1/host/lib/gcc/mips64-buildroot-linux-uclibc/10.3.0/../../../../mips64-buildroot-linux-uclibc/bin/ld: vde_l3.o: in function `ip_output_ready':
|
||||
vde_l3.c:(.text+0xb30): undefined reference to `iphead'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/5eeefcdac0b8974a424a885fdc2e82f7cb4b617d
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
|
||||
diff -Nura vde2-2.3.2.orig/src/vde_l3/vde_l3.c vde2-2.3.2/src/vde_l3/vde_l3.c
|
||||
--- vde2-2.3.2.orig/src/vde_l3/vde_l3.c 2022-04-21 11:05:17.393452698 +0200
|
||||
+++ vde2-2.3.2/src/vde_l3/vde_l3.c 2022-04-21 11:10:36.509804404 +0200
|
||||
@@ -100,17 +100,17 @@
|
||||
};
|
||||
|
||||
|
||||
-inline struct vde_ethernet_header *ethhead(struct vde_buff *vdb)
|
||||
+static inline struct vde_ethernet_header *ethhead(struct vde_buff *vdb)
|
||||
{
|
||||
return (struct vde_ethernet_header*)(vdb->data);
|
||||
}
|
||||
|
||||
-inline struct iphdr *iphead(struct vde_buff *vdb)
|
||||
+static inline struct iphdr *iphead(struct vde_buff *vdb)
|
||||
{
|
||||
return (struct iphdr*)(vdb->data + 14);
|
||||
}
|
||||
|
||||
-inline void *payload(struct vde_buff *vdb)
|
||||
+static inline void *payload(struct vde_buff *vdb)
|
||||
{
|
||||
return (uint8_t*)(vdb->data + 14 + sizeof(struct iphdr));
|
||||
}
|
Loading…
Reference in New Issue
Block a user