From c3938a10a21b4eda3cc002c5e0c65ac7191d8b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 25 Sep 2019 00:53:40 +0100 Subject: [PATCH] Add gcc10-conversion.patch provide by Red Hat's compiler team --- gcc10-conversion.patch | 26 ++++++++++++++++++++++++++ p7zip.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc10-conversion.patch diff --git a/gcc10-conversion.patch b/gcc10-conversion.patch new file mode 100644 index 0000000..45f9f84 --- /dev/null +++ b/gcc10-conversion.patch @@ -0,0 +1,26 @@ +diff -Nrup a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp +--- a/CPP/Windows/ErrorMsg.cpp 2015-01-18 11:20:28.000000000 -0700 ++++ b/CPP/Windows/ErrorMsg.cpp 2019-09-24 13:01:18.887289152 -0600 +@@ -14,14 +14,14 @@ UString MyFormatMessage(DWORD errorCode) + AString msg; + + switch(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 ; +- case E_ABORT : txt = "E_ABORT"; break ; +- case E_FAIL : txt = "E_FAIL"; break ; +- case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; +- case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; +- case E_INVALIDARG : txt = "E_INVALIDARG"; break ; ++ case unsigned (ERROR_NO_MORE_FILES) : txt = "No more files"; break ; ++ case unsigned (E_NOTIMPL) : txt = "E_NOTIMPL"; break ; ++ case unsigned (E_NOINTERFACE) : txt = "E_NOINTERFACE"; break ; ++ case unsigned (E_ABORT) : txt = "E_ABORT"; break ; ++ case unsigned (E_FAIL) : txt = "E_FAIL"; break ; ++ case unsigned (STG_E_INVALIDFUNCTION) : txt = "STG_E_INVALIDFUNCTION"; break ; ++ case unsigned (E_OUTOFMEMORY) : txt = "E_OUTOFMEMORY"; break ; ++ case unsigned (E_INVALIDARG) : txt = "E_INVALIDARG"; break ; + case ERROR_DIRECTORY : txt = "Error Directory"; break ; + default: + txt = strerror(errorCode); diff --git a/p7zip.spec b/p7zip.spec index 5044a9e..29349dd 100644 --- a/p7zip.spec +++ b/p7zip.spec @@ -7,7 +7,7 @@ Summary: Very high compression ratio file archiver Name: p7zip Version: 16.02 -Release: 15%{?dist} +Release: 16%{?dist} # Files under C/Compress/Lzma/ are dual LGPL or CPL License: LGPLv2 and (LGPLv2+ or CPL) URL: http://p7zip.sourceforge.net/ @@ -28,6 +28,7 @@ Patch6: CVE-2016-9296.patch Patch7: 05-hardening-flags.patch Patch10: CVE-2017-17969.patch Patch11: 14-Fix-g++-warning.patch +Patch12: gcc10-conversion.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -172,6 +173,9 @@ make test %changelog +* Tue Sep 24 2019 Sérgio Basto - 16.02-16 +- Add gcc10-conversion.patch provide by Red Hat's compiler team + * Thu Jul 25 2019 Fedora Release Engineering - 16.02-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild