diff --git a/0001-Fix-charconv-support-with-MSVC-GCC11.patch b/0001-Fix-charconv-support-with-MSVC-GCC11.patch new file mode 100644 index 0000000..fcdf094 --- /dev/null +++ b/0001-Fix-charconv-support-with-MSVC-GCC11.patch @@ -0,0 +1,43 @@ +From 1e8e6c8da1e22c4d32e50d8999705fd370824736 Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" +Date: Tue, 1 Jun 2021 23:35:40 +0000 +Subject: [PATCH] Fix charconv support with MSVC/GCC11 + +BUG: 437890 +--- + src/KSeExpr/Utils.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/KSeExpr/Utils.cpp b/src/KSeExpr/Utils.cpp +index 22e6cd8..e48cfe9 100644 +--- a/src/KSeExpr/Utils.cpp ++++ b/src/KSeExpr/Utils.cpp +@@ -6,6 +6,7 @@ + + #if defined(KSeExpr_HAVE_CHARCONV_WITH_DOUBLES) + #include ++#include + + double_t KSeExpr::Utils::atof(const char *num) + { +@@ -21,7 +22,7 @@ double_t KSeExpr::Utils::atof(const char *num) + double_t KSeExpr::Utils::atof(const std::string &num) + { + double_t v; +- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v); ++ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v); + if (ec == std::errc()) { + return v; + } else { +@@ -32,7 +33,7 @@ double_t KSeExpr::Utils::atof(const std::string &num) + int32_t KSeExpr::Utils::strtol(const std::string &num) + { + int32_t v; +- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v); ++ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v); + if (ec == std::errc()) { + return v; + } else if (ec == std::errc::result_out_of_range) { +-- +2.31.1 + diff --git a/kseexpr.changes b/kseexpr.changes index 84779e8..c677fe4 100644 --- a/kseexpr.changes +++ b/kseexpr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 2 06:04:23 UTC 2021 - Christophe Giboudeaux + +- Add GCC 11 build fix (kde#437890): + * 0001-Fix-charconv-support-with-MSVC-GCC11.patch + ------------------------------------------------------------------- Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer diff --git a/kseexpr.spec b/kseexpr.spec index 7b17c92..449ab0b 100644 --- a/kseexpr.spec +++ b/kseexpr.spec @@ -34,6 +34,8 @@ Source0: https://download.kde.org/stable/%{name}/4.0.1/%{name}-%{version} Patch0: Fix-translation-lookup-in-stock-Linux-deployments.patch # PATCH-FIX-OPENSUSE Patch1: Fix-possible-compiler-error.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Fix-charconv-support-with-MSVC-GCC11.patch BuildRequires: extra-cmake-modules BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Gui)