0002-fstp-Add-static-to-inline-functions.patch 1.4 KB

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