0003-Fixcompilation-with-GCC-10-x.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 084126b03f29b33ab3e657c66e8c6a439f27f8e1 Mon Sep 17 00:00:00 2001
  2. From: Harald Geyer <harald@ccbib.org>
  3. Date: Mon, 10 Feb 2020 13:15:10 +0100
  4. Subject: [PATCH] Fix compilation with GCC >= 10.x
  5. Starting with GCC >= 10.x, -fno-common is used as default
  6. instead of -fcommon. This patch fixes the compilation.
  7. Closes: #148
  8. Suggested-by: Conrad Kostecki <conrad@kostecki.com>
  9. Signed-off-by: Harald Geyer <harald@ccbib.org>
  10. [Retrieved from:
  11. https://github.com/lcdproc/lcdproc/commit/084126b03f29b33ab3e657c66e8c6a439f27f8e1]
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. ---
  14. clients/lcdproc/iface.c | 1 +
  15. clients/lcdproc/iface.h | 2 +-
  16. 2 files changed, 2 insertions(+), 1 deletion(-)
  17. diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c
  18. index 40e50cb7..1ac355bd 100644
  19. --- a/clients/lcdproc/iface.c
  20. +++ b/clients/lcdproc/iface.c
  21. @@ -32,6 +32,7 @@
  22. #define UNSET_INT -1
  23. #define UNSET_STR "\01"
  24. +IfaceInfo iface[MAX_INTERFACES];
  25. static int iface_count = 0; /* number of interfaces */
  26. static char unit_label[10] = "B"; /* default unit label is Bytes */
  27. diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h
  28. index cc6dbaaf..c1bd6b5b 100644
  29. --- a/clients/lcdproc/iface.h
  30. +++ b/clients/lcdproc/iface.h
  31. @@ -18,7 +18,7 @@
  32. /** max number of interfaces in multi-interface mode */
  33. #define MAX_INTERFACES 3
  34. -IfaceInfo iface[MAX_INTERFACES]; /* interface info */
  35. +extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */
  36. /** Update screen content */
  37. int iface_screen(int rep, int display, int *flags_ptr);