fix build failed with gcc 10
This commit is contained in:
parent
78be7354c5
commit
42655fc759
34
fix-build-failed-with-gcc-10.patch
Normal file
34
fix-build-failed-with-gcc-10.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 063cd89c047e924b24405737c892fbcbaf51ba6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: sunguoshuai <sunguoshuai@huawei.com>
|
||||||
|
Date: Fri, 30 Jul 2021 16:08:30 +0800
|
||||||
|
Subject: [PATCH] fix build failed with gcc 10
|
||||||
|
|
||||||
|
---
|
||||||
|
CPP/Windows/ErrorMsg.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp
|
||||||
|
index 99684ae..7949880 100644
|
||||||
|
--- a/CPP/Windows/ErrorMsg.cpp
|
||||||
|
+++ b/CPP/Windows/ErrorMsg.cpp
|
||||||
|
@@ -13,7 +13,7 @@ UString MyFormatMessage(DWORD errorCode)
|
||||||
|
const char * txt = 0;
|
||||||
|
AString msg;
|
||||||
|
|
||||||
|
- switch(errorCode) {
|
||||||
|
+ switch(HRESULT(errorCode)) {
|
||||||
|
case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
|
||||||
|
case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
|
||||||
|
case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
|
||||||
|
@@ -43,7 +43,7 @@ bool MyFormatMessage(DWORD messageID, CSysString &message)
|
||||||
|
const char * txt = 0;
|
||||||
|
AString msg;
|
||||||
|
|
||||||
|
- switch(messageID) {
|
||||||
|
+ switch(HRESULT(messageID)) {
|
||||||
|
case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
|
||||||
|
case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
|
||||||
|
case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: p7zip
|
Name: p7zip
|
||||||
Version: 16.02
|
Version: 16.02
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: 7z for Linux system
|
Summary: 7z for Linux system
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://sourceforge.net/projects/p7zip/
|
URL: https://sourceforge.net/projects/p7zip/
|
||||||
@ -11,6 +11,7 @@ Patch0: CVE-2017-17969.patch
|
|||||||
Patch1: CVE-2016-9296.patch
|
Patch1: CVE-2016-9296.patch
|
||||||
Patch2: CVE-2018-5996.patch
|
Patch2: CVE-2018-5996.patch
|
||||||
Patch3: CVE-2018-10115.patch
|
Patch3: CVE-2018-10115.patch
|
||||||
|
Patch4: fix-build-failed-with-gcc-10.patch
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++
|
BuildRequires: gcc gcc-c++
|
||||||
|
|
||||||
@ -46,6 +47,9 @@ install -m 0644 man1/7za.1 %{buildroot}/%{_mandir}/man1
|
|||||||
%{_mandir}/*
|
%{_mandir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri 30 Jul 2021 sunguoshuai <sunguoshuai@huawei.com> - 16.02-4
|
||||||
|
- fix build failed with gcc 10
|
||||||
|
|
||||||
* Sat Jul 10 2021 wangyue <wangyue92@huawei.com> - 16.02-3
|
* Sat Jul 10 2021 wangyue <wangyue92@huawei.com> - 16.02-3
|
||||||
- Add gcc-c++ to build dependency
|
- Add gcc-c++ to build dependency
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user