1From f04f24dd5ca5c1c13608b144ab66e2ccd47f106a Mon Sep 17 00:00:00 2001 2From: Sergei Trofimovich <slyfox@gentoo.org> 3Date: Sun, 19 Jan 2020 19:53:41 +0000 4Subject: [PATCH] src/headers/daemon.h: avoid redefinition of 5 'last_selection_time' 6 7Noticed build failure on gcc-10 as: 8 9``` 10gcc -L/home/slyfox/dev/git/gpm/src -o gpm mice.o ... report.o tools.o -lm 11ld: twiddler.o:gpm/src/headers/daemon.h:183: 12 multiple definition of `last_selection_time'; mice.o:gpm/src/headers/daemon.h:183: first defined here 13ld: synaptics.o:git/gpm/src/headers/daemon.h:183: 14 multiple definition of `last_selection_time'; mice.o:git/gpm/src/headers/daemon.h:183: first defined here 15``` 16 17gcc-10 will change the default from -fcommon to fno-common: 18https://gcc.gnu.org/PR85678. 19 20The error also happens if CFLAGS=-fno-common passed explicitly. 21 22Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 23Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> 24--- 25 src/headers/daemon.h | 2 +- 26 1 file changed, 1 insertion(+), 1 deletion(-) 27 28diff --git a/src/headers/daemon.h b/src/headers/daemon.h 29index a8936ad..24a1a97 100644 30--- a/src/headers/daemon.h 31+++ b/src/headers/daemon.h 32@@ -180,7 +180,7 @@ extern struct mouse_features mouse_table[3], 33 extern Gpm_Type mice[]; 34 extern Gpm_Type *repeated_type; 35 36-time_t last_selection_time; 37+extern time_t last_selection_time; 38 39 40 41-- 422.20.1 43 44