From e79d5d1f8ee3c51da915ef760fbb87bd6b91a617 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Sat, 10 Apr 2021 17:11:10 +0100 Subject: [PATCH] fuzzer: fix build as with header order and ARRAY_SIZE redefinition ARRAY_SIZE was being redefined, simplest option is to remove, but I think this code has to additionally be compiled with external Fuzzer. Fix build. Signed-off-by: Liam Girdwood --- tools/fuzzer/fuzzer.h | 2 ++ tools/fuzzer/topology.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/fuzzer/fuzzer.h b/tools/fuzzer/fuzzer.h index 4d6efb804..d1149d127 100644 --- a/tools/fuzzer/fuzzer.h +++ b/tools/fuzzer/fuzzer.h @@ -30,7 +30,9 @@ #define IRQ_WAKE_THREAD 1 #define IRQ_HANDLED 2 +#ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#endif struct fuzz; struct fuzz_platform; diff --git a/tools/fuzzer/topology.c b/tools/fuzzer/topology.c index 7b4b85fd2..485d02ebc 100644 --- a/tools/fuzzer/topology.c +++ b/tools/fuzzer/topology.c @@ -13,12 +13,13 @@ #include #include #include -#include "../fuzzer/fuzzer.h" #include #include #include #include +#include "../fuzzer/fuzzer.h" + const struct sof_dai_types sof_dais[] = { {"SSP", SOF_DAI_INTEL_SSP}, {"HDA", SOF_DAI_INTEL_HDA},