diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-08-12 23:26:01 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-08-13 22:32:08 -0700 |
commit | 4c116285814af6d833dbe8caeaf6981022904ca9 (patch) | |
tree | f917e6a2d454b4707932673ca91d34a9905dd97a /meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch | |
parent | 178a52005111c971b46f8c7d6ffca2ffa5092e8e (diff) | |
download | meta-openembedded-contrib-4c116285814af6d833dbe8caeaf6981022904ca9.tar.gz |
memtester: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch')
-rw-r--r-- | meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch b/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch new file mode 100644 index 0000000000..ffd9b9f266 --- /dev/null +++ b/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch @@ -0,0 +1,57 @@ +From 01f1c05702eb534271777648c976ab6402a5145b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 23:18:30 -0700 +Subject: [PATCH] Define mword16 and mword8 once + +Defining them in .h meant they are defined in all .c files including +this .h file + +Fixes build with gcc 10+ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + tests.c | 9 +++++++++ + types.h | 9 --------- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/tests.c b/tests.c +index be1b350..4305bed 100644 +--- a/tests.c ++++ b/tests.c +@@ -27,6 +27,15 @@ char progress[] = "-\\|/"; + #define PROGRESSOFTEN 2500 + #define ONE 0x00000001L + ++union { ++ unsigned char bytes[UL_LEN/8]; ++ ul val; ++} mword8; ++ ++union { ++ unsigned short u16s[UL_LEN/16]; ++ ul val; ++} mword16; + /* Function definitions. */ + + int compare_regions(ulv *bufa, ulv *bufb, size_t count) { +diff --git a/types.h b/types.h +index ad7ce73..e14ea32 100644 +--- a/types.h ++++ b/types.h +@@ -25,12 +25,3 @@ struct test { + int (*fp)(); + }; + +-union { +- unsigned char bytes[UL_LEN/8]; +- ul val; +-} mword8; +- +-union { +- unsigned short u16s[UL_LEN/16]; +- ul val; +-} mword16; +-- +2.28.0 + |