0002-ushare-fix-building-with-gcc-5.x.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 6abc52190accc8d8b17455420e234a1d7dc7ba55 Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <peter@korsgaard.com>
  3. Date: Mon, 16 Nov 2015 23:15:27 +0100
  4. Subject: [PATCH] ushare: fix building with gcc 5.x
  5. GCC5 defaults to -std=gnu11, which has different semantics for inline than
  6. previous versions:
  7. https://gcc.gnu.org/gcc-5/porting_to.html
  8. Which causes linker issues when display_headers() and start_log() are
  9. referenced from other files. There's no real reason why these needs to be
  10. inline, so just drop the keyword.
  11. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  12. ---
  13. src/trace.c | 2 +-
  14. src/ushare.c | 2 +-
  15. 2 files changed, 2 insertions(+), 2 deletions(-)
  16. diff --git a/src/trace.c b/src/trace.c
  17. index 50729ef..4e314ef 100644
  18. --- a/src/trace.c
  19. +++ b/src/trace.c
  20. @@ -57,7 +57,7 @@ print_log (log_level level, const char *format, ...)
  21. va_end (va);
  22. }
  23. -inline void
  24. +void
  25. start_log (void)
  26. {
  27. openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
  28. diff --git a/src/ushare.c b/src/ushare.c
  29. index b64451e..af46e78 100644
  30. --- a/src/ushare.c
  31. +++ b/src/ushare.c
  32. @@ -496,7 +496,7 @@ reload_config (int s __attribute__ ((unused)))
  33. }
  34. }
  35. -inline void
  36. +void
  37. display_headers (void)
  38. {
  39. printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"),
  40. --
  41. 2.1.4