fix failure caused by GCC upgrade to GCC-10

This commit is contained in:
王勇 2021-08-03 17:04:39 +08:00
parent 8e01e9de79
commit f911aef90d
2 changed files with 18 additions and 1 deletions

13
Fix-redis5-gcc-10.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/sds.h b/src/sds.h
index 1bdb60d..adcc12c 100644
--- a/src/sds.h
+++ b/src/sds.h
@@ -34,7 +34,7 @@
#define __SDS_H
#define SDS_MAX_PREALLOC (1024*1024)
-const char *SDS_NOINIT;
+extern const char *SDS_NOINIT;
#include <sys/types.h>
#include <stdarg.h>

View File

@ -6,7 +6,7 @@
%global Pname redis
Name: redis5
Version: 5.0.7
Release: 2
Release: 3
Summary: A persistent key-value database
License: BSD and MIT
URL: https://redis.io
@ -24,6 +24,7 @@ Source10: https://github.com/antirez/%{Pname}-doc/archive/%{doc_commi
%ifarch aarch64
Patch0001: Modify-aarch64-architecture-jemalloc-page-size-from-from-4k-to-64k.patch
%endif
Patch0002: Fix-redis5-gcc-10.patch
BuildRequires: gcc
%if %{with tests}
BuildRequires: procps-ng tcl
@ -184,6 +185,9 @@ exit 0
%{_docdir}/%{Pname}
%changelog
* Tue Aug 03 2021 wangyong <wangyong187@huawei.com> - 5.0.7-3
- Fix build error caused by GCC upgrade to GCC-10
* Mon Mar 29 2021 lingsheng <lingsheng@huawei.com> - 5.0.7-2
- Modify aarch64 architecture jemalloc page size from 4k to 64k