!4 Fix link failure with gcc-10
From: @weidongkl Reviewed-by: @yeqinglong01 Signed-off-by: @yeqinglong01
This commit is contained in:
commit
5d202e05fd
53
Fix-link-failure-with-gcc-10.patch
Normal file
53
Fix-link-failure-with-gcc-10.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -1,10 +1,11 @@
|
|||||||
Name: deepin-system-monitor
|
Name: deepin-system-monitor
|
||||||
Version: 5.6.11.13
|
Version: 5.6.11.13
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A more user-friendly system monitor
|
Summary: A more user-friendly system monitor
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
URL: https://github.com/linuxdeepin/deepin-system-monitor
|
URL: https://github.com/linuxdeepin/deepin-system-monitor
|
||||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: Fix-link-failure-with-gcc-10.patch
|
||||||
|
|
||||||
BuildRequires: qt5-devel
|
BuildRequires: qt5-devel
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -33,7 +34,7 @@ Recommends: deepin-manual
|
|||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH=%{_qt5_bindir}:$PATH
|
export PATH=%{_qt5_bindir}:$PATH
|
||||||
@ -57,6 +58,9 @@ popd
|
|||||||
%{_datadir}/polkit-1/actions/com.deepin.pkexec.deepin-system-monitor.policy
|
%{_datadir}/polkit-1/actions/com.deepin.pkexec.deepin-system-monitor.policy
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 29 2021 weidong <weidong@uniontech.com> - 5.6.11.13-2
|
||||||
|
- Fix gcc10.3 compilation deepin-system-monitor failed
|
||||||
|
|
||||||
* Wed Jul 07 2021 weidong <weidong@uniontech.com> - 5.6.11.13-1
|
* Wed Jul 07 2021 weidong <weidong@uniontech.com> - 5.6.11.13-1
|
||||||
- Update to 5.6.11.13
|
- Update to 5.6.11.13
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user