From 28357ff75991391e3b14b493963be94b6c73a3d4 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Sun, 21 Jun 2020 00:15:39 +0200 Subject: [PATCH] memtester: Fix build with -fno-common --- .../memtester-002-fix_GCC10_FTBFS.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/debug/memtester/patches/memtester-002-fix_GCC10_FTBFS.patch diff --git a/packages/debug/memtester/patches/memtester-002-fix_GCC10_FTBFS.patch b/packages/debug/memtester/patches/memtester-002-fix_GCC10_FTBFS.patch new file mode 100644 index 0000000000..1e87289fb5 --- /dev/null +++ b/packages/debug/memtester/patches/memtester-002-fix_GCC10_FTBFS.patch @@ -0,0 +1,39 @@ +Description: reorganize variables to fix GCC 10 FTBFS + Define variables in source, make types in header. +Author: Laszlo Boszormenyi (GCS) +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;