memtester: Fix build with -fno-common

This commit is contained in:
Jernej Skrabec 2020-06-21 00:15:39 +02:00
parent 5f0bee8ac1
commit 28357ff759

View File

@ -0,0 +1,39 @@
Description: reorganize variables to fix GCC 10 FTBFS
Define variables in source, make types in header.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Bug-Debian: https://bugs.debian.org/957529
Last-Update: 2020-04-19
---
--- memtester-4.3.0.orig/tests.c
+++ memtester-4.3.0/tests.c
@@ -27,6 +27,9 @@ char progress[] = "-\\|/";
#define PROGRESSOFTEN 2500
#define ONE 0x00000001L
+mword8_t mword8;
+mword16_t mword16;
+
/* Function definitions. */
int compare_regions(ulv *bufa, ulv *bufb, size_t count) {
--- memtester-4.3.0.orig/types.h
+++ memtester-4.3.0/types.h
@@ -25,12 +25,12 @@ struct test {
int (*fp)();
};
-union {
+typedef union {
unsigned char bytes[UL_LEN/8];
ul val;
-} mword8;
+} mword8_t;
-union {
+typedef union {
unsigned short u16s[UL_LEN/16];
ul val;
-} mword16;
+} mword16_t;