From 0066a82527d37348fbe1307aabe084d1be9b9b77 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 21 Apr 2022 11:19:07 +0200 Subject: [PATCH] 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 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) (cherry picked from commit 68ef4e546dcdade5fc768fbebf9e064f5240db2d) Signed-off-by: Peter Korsgaard --- ...de_l3-Add-static-to-inline-functions.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch diff --git a/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch b/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch new file mode 100644 index 0000000000..7f771dfc7e --- /dev/null +++ b/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch @@ -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 + +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)); + }