Add patch to fix build in Rawhide
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
This commit is contained in:
parent
c864595645
commit
2827d37bdc
|
@ -0,0 +1,37 @@
|
|||
From 40848993ca0b4ce826b37508b740055d97a961e2 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Dieter <jdieter@lesbg.com>
|
||||
Date: Mon, 24 Apr 2017 21:16:12 +0300
|
||||
Subject: [PATCH] [common] Fix overflow error with GCC 7
|
||||
|
||||
Make sure n is always added to unsigned 1 to avoid overflow errors
|
||||
|
||||
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
|
||||
---
|
||||
src/common/galois_coeff.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/common/galois_coeff.h b/src/common/galois_coeff.h
|
||||
index 305bd10..da5a683 100644
|
||||
--- a/src/common/galois_coeff.h
|
||||
+++ b/src/common/galois_coeff.h
|
||||
@@ -38,7 +38,7 @@ constexpr uint8_t gf_mul2(uint8_t x) {
|
||||
* \return log(x)
|
||||
*/
|
||||
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);
|
||||
+ return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1U);
|
||||
}
|
||||
|
||||
/*! \brief Compute base 2 exponent in GF(2^8).
|
||||
@@ -48,7 +48,7 @@ constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) {
|
||||
* \return exp(x)
|
||||
*/
|
||||
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);
|
||||
+ return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1U);
|
||||
}
|
||||
|
||||
/*! \brief Returns lookup table for base 2 logarithm in GF(2^8). */
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Name: lizardfs
|
||||
Summary: Distributed, fault tolerant file system
|
||||
Version: 3.10.6
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
# LizardFS is under GPLv3 while crcutil is under ASL 2.0 and there's one header,
|
||||
# src/common/coroutine.h, under the Boost license
|
||||
License: GPLv3 and ASL 2.0 and Boost
|
||||
|
@ -16,6 +16,9 @@ Patch1: 0001-chunkserver-Add-alternative-include-path-for-falloca.patch
|
|||
# Make sure we drop supplementary groups when running setgid
|
||||
# Pull request at https://github.com/lizardfs/lizardfs/pull/533
|
||||
Patch2: 0001-main-Remove-supplementary-groups-when-dropping-privi.patch
|
||||
# Fix overflow error in GCC 7
|
||||
# Pull request at https://github.com/lizardfs/lizardfs/pull/540
|
||||
Patch3: 0001-common-Fix-overflow-error-with-GCC-7.patch
|
||||
BuildRequires: fuse-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: pkgconfig
|
||||
|
@ -196,9 +199,7 @@ exit 0
|
|||
############################################################
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%autosetup -p1
|
||||
|
||||
# Remove /usr/bin/env from bash scripts
|
||||
for i in src/tools/mfstools.sh src/mount/mfssnapshot src/master/mfsrestoremaster.in \
|
||||
|
@ -413,6 +414,9 @@ install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/security/limits.d/95-lizardf
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 24 2017 Jonathan Dieter <jdieter@lesbg.com> - 3.10.6-6
|
||||
- Add patch to fix building in Rawhide
|
||||
|
||||
* Thu Apr 20 2017 Jonathan Dieter <jdieter@lesbg.com> - 3.10.6-5
|
||||
- Fix BuildRequires for Judy-devel
|
||||
- Add BR: pam-devel
|
||||
|
|
Loading…
Reference in New Issue