1*4882a593SmuzhiyunFrom 67bc8443ac7e8144a78d84dee30a5cac3b5c99a4 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Romain Naour <romain.naour@gmail.com> 3*4882a593SmuzhiyunDate: Sun, 27 Aug 2017 23:56:05 +0200 4*4882a593SmuzhiyunSubject: [PATCH] fstp: Add static to inline functions 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunFrom [1] 7*4882a593Smuzhiyun"This is needed to avoid a link error where the inline functions appear 8*4882a593Smuzhiyunmissing at link time. 9*4882a593SmuzhiyunFrom c99 standard inline function should either be declared static or 10*4882a593Smuzhiyunhave an extern instance in a c file for linking. 11*4882a593SmuzhiyunThis fix is necessary to build with gcc 7; for some reason it was not 12*4882a593Smuzhiyuntrigerred before." 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun[1] https://git.buildroot.net/buildroot/commit/?id=21133ada326c87627f7bdee4493d8086587c3cca 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunSigned-off-by: Romain Naour <romain.naour@gmail.com> 17*4882a593Smuzhiyun--- 18*4882a593Smuzhiyun src/vde_switch/fstp.c | 4 ++-- 19*4882a593Smuzhiyun 1 file changed, 2 insertions(+), 2 deletions(-) 20*4882a593Smuzhiyun 21*4882a593Smuzhiyundiff --git a/src/vde_switch/fstp.c b/src/vde_switch/fstp.c 22*4882a593Smuzhiyunindex aab7324..b1e7ee8 100644 23*4882a593Smuzhiyun--- a/src/vde_switch/fstp.c 24*4882a593Smuzhiyun+++ b/src/vde_switch/fstp.c 25*4882a593Smuzhiyun@@ -30,14 +30,14 @@ static int numports; 26*4882a593Smuzhiyun #ifdef FSTP 27*4882a593Smuzhiyun #include <fstp.h> 28*4882a593Smuzhiyun /*********************** sending macro used by FSTP & Core ******************/ 29*4882a593Smuzhiyun-void inline ltonstring(unsigned long l,unsigned char *s) { 30*4882a593Smuzhiyun+static void inline ltonstring(unsigned long l,unsigned char *s) { 31*4882a593Smuzhiyun s[3]=l; l>>=8; 32*4882a593Smuzhiyun s[2]=l; l>>=8; 33*4882a593Smuzhiyun s[1]=l; l>>=8; 34*4882a593Smuzhiyun s[0]=l; 35*4882a593Smuzhiyun } 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun-unsigned long inline nstringtol(unsigned char *s) { 38*4882a593Smuzhiyun+static unsigned long inline nstringtol(unsigned char *s) { 39*4882a593Smuzhiyun return (s[0]<<24)+(s[1]<<16)+(s[2]<<8)+s[3]; 40*4882a593Smuzhiyun } 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun-- 43*4882a593Smuzhiyun2.9.5 44*4882a593Smuzhiyun 45