1 Star 0 Fork 15

konglidong/deepin-system-monitor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix-link-failure-with-gcc-10.patch 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
weidongkl 提交于 2021-07-29 10:20 . Fix link failuer with gcc-10
From cf73455412549e14f1ff8a01925964f1e7896eaf Mon Sep 17 00:00:00 2001
From: weidong <weidong@uniontech.com>
Date: Tue, 3 Aug 2021 19:12:51 +0800
Subject: [PATCH] Fix link failure with gcc-10
---
src/process/desktop_entry_stat.cpp | 2 +-
src/process/process_stat.cpp | 2 +-
src/process/system_stat.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/process/desktop_entry_stat.cpp b/src/process/desktop_entry_stat.cpp
index d2bedc6..e0a8c9c 100644
--- a/src/process/desktop_entry_stat.cpp
+++ b/src/process/desktop_entry_stat.cpp
@@ -35,7 +35,7 @@ DCORE_USE_NAMESPACE
static const int kUpdateInterval = 1000 * 300; // 5 minutes interval
-auto print_err = [](decltype(errno) e, const QString &msg)
+static void print_err(decltype(errno) e, const QString &msg)
{
qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg;
};
diff --git a/src/process/process_stat.cpp b/src/process/process_stat.cpp
index e68052e..cb161b0 100644
--- a/src/process/process_stat.cpp
+++ b/src/process/process_stat.cpp
@@ -42,7 +42,7 @@
#define PROC_FD_NAME_PATH "/proc/%u/fd/%s"
#define PROC_SCHEDSTAT_PATH "/proc/%u/schedstat"
-auto print_err = [](decltype(errno) e, const QString &msg)
+static void print_err(decltype(errno) e, const QString &msg)
{
qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg;
};
diff --git a/src/process/system_stat.cpp b/src/process/system_stat.cpp
index cc7b359..78060f3 100644
--- a/src/process/system_stat.cpp
+++ b/src/process/system_stat.cpp
@@ -49,7 +49,7 @@
#define MAX_NAME_LEN 128
-auto print_err = [](decltype(errno) e, const QString &msg)
+static void print_err(decltype(errno) e, const QString &msg)
{
qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg;
};
--
2.20.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/konglidong/deepin-system-monitor.git
git@gitee.com:konglidong/deepin-system-monitor.git
konglidong
deepin-system-monitor
deepin-system-monitor
master

搜索帮助