From f3de4729ce7bd5c36478c3c30784f4f1dc6a80ed Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 27 Jun 2024 20:27:58 -0400 Subject: Fix an issue building the fft plugin on greyscale targets on some simulator toolchains The fft plugin uses pluginlib osd stuff _and_ greylib together, which results in two conflicting declarations of the _grey_info struct. Normally we treat the one in pluginlib as __weak but we disable that on windows simulator builds, because the osd code ends up requiring it. due to not using-function-sections and -fdata-sections on simulator builds. Simply disabling all of that crap doesn't seem to help. So instead, for simulator builds, mark the fft's struct as extern, only using the one in pluginlib. Change-Id: I1adf9acc265a60f91b8ac0fcad9d792e3240a9d9 --- apps/plugins/fft/fft.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c index 4d36302ddf..99d9e033fc 100644 --- a/apps/plugins/fft/fft.c +++ b/apps/plugins/fft/fft.c @@ -33,8 +33,13 @@ #include "lib/osd.h" #ifndef HAVE_LCD_COLOR +#if defined(SIMULATOR) +// Use the one in pluginlib/osd +extern GREY_INFO_STRUCT +#else GREY_INFO_STRUCT #endif +#endif #include "lib/pluginlib_actions.h" -- cgit v1.2.3