0001-Fix-build-with-GCC-10.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8 Mon Sep 17 00:00:00 2001
  2. From: Vinson Lee <vlee@freedesktop.org>
  3. Date: Thu, 30 Jan 2020 22:09:45 -0800
  4. Subject: [PATCH] Fix build with GCC 10.
  5. CC trinity
  6. /usr/bin/ld: debug.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  7. /usr/bin/ld: log-files.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  8. /usr/bin/ld: log.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  9. /usr/bin/ld: main.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  10. /usr/bin/ld: output.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  11. /usr/bin/ld: params.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  12. /usr/bin/ld: shm.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  13. /usr/bin/ld: trinity.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here
  14. Fixes: 13856316c259 ("reinstate the log-to-file code for now.")
  15. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
  16. [Retrieved from:
  17. https://github.com/kernelslacker/trinity/commit/e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8]
  18. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  19. ---
  20. include/logfile.h | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/include/logfile.h b/include/logfile.h
  23. index 90ea8b23..2305ac15 100644
  24. --- a/include/logfile.h
  25. +++ b/include/logfile.h
  26. @@ -5,7 +5,7 @@
  27. FILE *find_logfile_handle(void);
  28. void synclogs(void);
  29. -FILE *mainlogfile;
  30. +extern FILE *mainlogfile;
  31. void open_main_logfile(void);
  32. void close_logfile(FILE **handle);