Switch to upstream patch for building with GCC 7
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
This commit is contained in:
parent
2827d37bdc
commit
9747ae759b
|
@ -1,37 +1,48 @@
|
||||||
From 40848993ca0b4ce826b37508b740055d97a961e2 Mon Sep 17 00:00:00 2001
|
From ada5b685cf961b62a33afd2c79ad59d78a2789be Mon Sep 17 00:00:00 2001
|
||||||
From: Jonathan Dieter <jdieter@lesbg.com>
|
From: Jonathan Dieter <jdieter@lesbg.com>
|
||||||
Date: Mon, 24 Apr 2017 21:16:12 +0300
|
Date: Mon, 24 Apr 2017 21:16:12 +0300
|
||||||
Subject: [PATCH] [common] Fix overflow error with GCC 7
|
Subject: [PATCH] common: Fix overflow error with GCC 7
|
||||||
|
|
||||||
Make sure n is always added to unsigned 1 to avoid overflow errors
|
This commit makes sure n is unsigned to avoid overflow errors in GCC 7.
|
||||||
|
|
||||||
|
Closes #540
|
||||||
|
|
||||||
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
|
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
|
||||||
|
|
||||||
|
Change-Id: I09ae619029b756a11eeffee8fb55ffe2914c3e9a
|
||||||
---
|
---
|
||||||
src/common/galois_coeff.h | 4 ++--
|
src/common/galois_coeff.h | 6 +++---
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/common/galois_coeff.h b/src/common/galois_coeff.h
|
diff --git a/src/common/galois_coeff.h b/src/common/galois_coeff.h
|
||||||
index 305bd10..da5a683 100644
|
index 305bd10..07708ba 100644
|
||||||
--- a/src/common/galois_coeff.h
|
--- a/src/common/galois_coeff.h
|
||||||
+++ b/src/common/galois_coeff.h
|
+++ b/src/common/galois_coeff.h
|
||||||
@@ -38,7 +38,7 @@ constexpr uint8_t gf_mul2(uint8_t x) {
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- Copyright 2016 Skytechnology sp. z o.o.
|
||||||
|
+ Copyright 2017 Skytechnology sp. z o.o.
|
||||||
|
|
||||||
|
This file is part of LizardFS.
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ constexpr uint8_t gf_mul2(uint8_t x) {
|
||||||
|
* \param n Internal variable used for recursion.
|
||||||
* \return log(x)
|
* \return log(x)
|
||||||
*/
|
*/
|
||||||
constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
-constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
||||||
- return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1);
|
+constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, unsigned n = 1) {
|
||||||
+ return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1U);
|
return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Compute base 2 exponent in GF(2^8).
|
@@ -47,7 +47,7 @@ constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
||||||
@@ -48,7 +48,7 @@ constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
* \param n Internal variable used for recursion.
|
||||||
* \return exp(x)
|
* \return exp(x)
|
||||||
*/
|
*/
|
||||||
constexpr uint8_t gf_exp(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
-constexpr uint8_t gf_exp(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
||||||
- return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1);
|
+constexpr uint8_t gf_exp(uint8_t x, uint8_t pow2n = 2, unsigned n = 1) {
|
||||||
+ return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1U);
|
return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Returns lookup table for base 2 logarithm in GF(2^8). */
|
|
||||||
--
|
--
|
||||||
2.9.3
|
2.9.3
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Name: lizardfs
|
Name: lizardfs
|
||||||
Summary: Distributed, fault tolerant file system
|
Summary: Distributed, fault tolerant file system
|
||||||
Version: 3.10.6
|
Version: 3.10.6
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
# LizardFS is under GPLv3 while crcutil is under ASL 2.0 and there's one header,
|
# LizardFS is under GPLv3 while crcutil is under ASL 2.0 and there's one header,
|
||||||
# src/common/coroutine.h, under the Boost license
|
# src/common/coroutine.h, under the Boost license
|
||||||
License: GPLv3 and ASL 2.0 and Boost
|
License: GPLv3 and ASL 2.0 and Boost
|
||||||
|
@ -10,14 +10,14 @@ URL: http://www.lizardfs.org/
|
||||||
Source: https://github.com/lizardfs/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source: https://github.com/lizardfs/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: pam-lizardfs
|
Source1: pam-lizardfs
|
||||||
Source2: 95-lizardfs.conf
|
Source2: 95-lizardfs.conf
|
||||||
# Upstream patch at https://github.com/lizardfs/lizardfs/commit/bf9a99963cfbd46962579a5617bff8c20bc8339c
|
|
||||||
# Allows us to create sparse files in el7
|
# Allows us to create sparse files in el7
|
||||||
|
# Upstream patch at https://github.com/lizardfs/lizardfs/commit/bf9a99963cfbd46962579a5617bff8c20bc8339c
|
||||||
Patch1: 0001-chunkserver-Add-alternative-include-path-for-falloca.patch
|
Patch1: 0001-chunkserver-Add-alternative-include-path-for-falloca.patch
|
||||||
# Make sure we drop supplementary groups when running setgid
|
# Make sure we drop supplementary groups when running setgid
|
||||||
# Pull request at https://github.com/lizardfs/lizardfs/pull/533
|
# Pull request at https://github.com/lizardfs/lizardfs/pull/533
|
||||||
Patch2: 0001-main-Remove-supplementary-groups-when-dropping-privi.patch
|
Patch2: 0001-main-Remove-supplementary-groups-when-dropping-privi.patch
|
||||||
# Fix overflow error in GCC 7
|
# Fix overflow error in GCC 7
|
||||||
# Pull request at https://github.com/lizardfs/lizardfs/pull/540
|
# Upstream patch at https://github.com/lizardfs/lizardfs/commit/d65ce8aa4c10e914840d78246249b2451bd46ad2
|
||||||
Patch3: 0001-common-Fix-overflow-error-with-GCC-7.patch
|
Patch3: 0001-common-Fix-overflow-error-with-GCC-7.patch
|
||||||
BuildRequires: fuse-devel
|
BuildRequires: fuse-devel
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
@ -414,6 +414,9 @@ install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/security/limits.d/95-lizardf
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 25 2017 Jonathan Dieter <jdieter@lesbg.com> - 3.10.6-7
|
||||||
|
- Switch to upstream patch for building with GCC 7
|
||||||
|
|
||||||
* Mon Apr 24 2017 Jonathan Dieter <jdieter@lesbg.com> - 3.10.6-6
|
* Mon Apr 24 2017 Jonathan Dieter <jdieter@lesbg.com> - 3.10.6-6
|
||||||
- Add patch to fix building in Rawhide
|
- Add patch to fix building in Rawhide
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue