diff --git a/Fix-link-failure-with-gcc-10.patch b/Fix-link-failure-with-gcc-10.patch new file mode 100644 index 0000000000000000000000000000000000000000..317ca74406b6f7507a8cbc47509e8282d4120025 --- /dev/null +++ b/Fix-link-failure-with-gcc-10.patch @@ -0,0 +1,53 @@ +From cf73455412549e14f1ff8a01925964f1e7896eaf Mon Sep 17 00:00:00 2001 +From: weidong +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 + diff --git a/deepin-system-monitor.spec b/deepin-system-monitor.spec index 84495fd4b9577c275c8864aab9b67f5a9133d8ff..231a3db2cc1b98a5f2fe5a6a47210038437a97a2 100644 --- a/deepin-system-monitor.spec +++ b/deepin-system-monitor.spec @@ -1,10 +1,11 @@ Name: deepin-system-monitor Version: 5.6.11.13 -Release: 1 +Release: 2 Summary: A more user-friendly system monitor License: GPLv3 URL: https://github.com/linuxdeepin/deepin-system-monitor Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: Fix-link-failure-with-gcc-10.patch BuildRequires: qt5-devel BuildRequires: cmake @@ -33,7 +34,7 @@ Recommends: deepin-manual %{summary}. %prep -%autosetup +%autosetup -p1 %build export PATH=%{_qt5_bindir}:$PATH @@ -57,6 +58,9 @@ popd %{_datadir}/polkit-1/actions/com.deepin.pkexec.deepin-system-monitor.policy %changelog +* Thu Jul 29 2021 weidong - 5.6.11.13-2 +- Fix gcc10.3 compilation deepin-system-monitor failed + * Wed Jul 07 2021 weidong - 5.6.11.13-1 - Update to 5.6.11.13