1 Star 0 Fork 10

kerongw/gpm

forked from src-openEuler/gpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-build-fail-on-gcc-10.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
wangkerong 提交于 2021-07-30 11:21 . fix build fail on gcc-10
From f04f24dd5ca5c1c13608b144ab66e2ccd47f106a Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sun, 19 Jan 2020 19:53:41 +0000
Subject: [PATCH] src/headers/daemon.h: avoid redefinition of
'last_selection_time'
Noticed build failure on gcc-10 as:
```
gcc -L/home/slyfox/dev/git/gpm/src -o gpm mice.o ... report.o tools.o -lm
ld: twiddler.o:gpm/src/headers/daemon.h:183:
multiple definition of `last_selection_time'; mice.o:gpm/src/headers/daemon.h:183: first defined here
ld: synaptics.o:git/gpm/src/headers/daemon.h:183:
multiple definition of `last_selection_time'; mice.o:git/gpm/src/headers/daemon.h:183: first defined here
```
gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.
The error also happens if CFLAGS=-fno-common passed explicitly.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
src/headers/daemon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/headers/daemon.h b/src/headers/daemon.h
index a8936ad..24a1a97 100644
--- a/src/headers/daemon.h
+++ b/src/headers/daemon.h
@@ -180,7 +180,7 @@ extern struct mouse_features mouse_table[3],
extern Gpm_Type mice[];
extern Gpm_Type *repeated_type;
-time_t last_selection_time;
+extern time_t last_selection_time;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kerongw/gpm.git
git@gitee.com:kerongw/gpm.git
kerongw
gpm
gpm
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385