diff --git a/fix-multi-difine.patch b/fix-multi-difine.patch new file mode 100644 index 0000000000000000000000000000000000000000..e64b46df3a3121d404ed3b7b238dcdb3669781a5 --- /dev/null +++ b/fix-multi-difine.patch @@ -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; diff --git a/memtester.spec b/memtester.spec index 0812133593c088692ee273866412a92de504b3b7..6dbb3548aa2f9085494b7dd4a8ad5784cf610d6a 100644 --- a/memtester.spec +++ b/memtester.spec @@ -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 +- fix compile failure by upgrade to GCC-10 + * Sun Mar 29 2020 Wei Xiong - Package init