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