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