fix compile failure by GCC-10
Signed-off-by: Lu Weitao <luweitaobe@163.com>
This commit is contained in:
parent
e585a1db14
commit
bda35201b9
36
fix-multi-difine.patch
Normal file
36
fix-multi-difine.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -urN memtester-4.3.0/tests.c memtester-4.3.0-bak/tests.c
|
||||
--- memtester-4.3.0/tests.c 2012-06-10 05:45:22.000000000 +0800
|
||||
+++ memtester-4.3.0-bak/tests.c 2021-08-04 17:09:27.971110499 +0800
|
||||
@@ -27,6 +27,9 @@
|
||||
#define PROGRESSOFTEN 2500
|
||||
#define ONE 0x00000001L
|
||||
|
||||
+type_mword8 mword8;
|
||||
+type_mword16 mword16;
|
||||
+
|
||||
/* Function definitions. */
|
||||
|
||||
int compare_regions(ulv *bufa, ulv *bufb, size_t count) {
|
||||
diff -urN memtester-4.3.0/types.h memtester-4.3.0-bak/types.h
|
||||
--- memtester-4.3.0/types.h 2012-06-10 05:45:22.000000000 +0800
|
||||
+++ memtester-4.3.0-bak/types.h 2021-08-04 17:09:10.390965532 +0800
|
||||
@@ -25,12 +25,15 @@
|
||||
int (*fp)();
|
||||
};
|
||||
|
||||
-union {
|
||||
+typedef union {
|
||||
unsigned char bytes[UL_LEN/8];
|
||||
ul val;
|
||||
-} mword8;
|
||||
+} type_mword8;
|
||||
|
||||
-union {
|
||||
+typedef union {
|
||||
unsigned short u16s[UL_LEN/16];
|
||||
ul val;
|
||||
-} mword16;
|
||||
+} type_mword16;
|
||||
+
|
||||
+extern type_mword8 mword8;
|
||||
+extern type_mword16 mword16;
|
||||
@ -2,13 +2,14 @@
|
||||
|
||||
Name: memtester
|
||||
Version: 4.3.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A userspace utility for testing the memory subsystem for faults
|
||||
License: GPLv2
|
||||
URL: http://pyropus.ca/software/memtester/
|
||||
Source0: http://pyropus.ca/software/memtester/old-versions/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: memtester-fix-make-install-path.patch
|
||||
Patch1: fix-multi-difine.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
@ -18,6 +19,7 @@ A userspace utility for testing the memory subsystem for faults. It's portable a
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}/
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%make_build
|
||||
@ -39,6 +41,9 @@ make install DESTDIR="%{buildroot}"
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Wed Aug 4 2021 Lu Weitao <luweitao2@huawei.com>
|
||||
- fix compile failure by upgrade to GCC-10
|
||||
|
||||
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
|
||||
- Package init
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user