From b697a3018848fbfaf445212b8035abd76991ca85 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 22 May 2020 00:06:50 +0100 Subject: [PATCH] Fix build Signed-off-by: falkTX --- source/backend/plugin/CarlaPluginFluidSynth.cpp | 3 ++- source/utils/CarlaScopeUtils.hpp | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/backend/plugin/CarlaPluginFluidSynth.cpp b/source/backend/plugin/CarlaPluginFluidSynth.cpp index e49c608e0..6c342aa05 100644 --- a/source/backend/plugin/CarlaPluginFluidSynth.cpp +++ b/source/backend/plugin/CarlaPluginFluidSynth.cpp @@ -1,6 +1,6 @@ /* * Carla FluidSynth Plugin - * Copyright (C) 2011-2019 Filipe Coelho + * Copyright (C) 2011-2020 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1913,6 +1913,7 @@ CarlaPlugin* CarlaPlugin::newFluidSynth(const Initializer& init, PluginType ptyp return nullptr; // unused + (void)ptype; (void)use16Outs; #endif } diff --git a/source/utils/CarlaScopeUtils.hpp b/source/utils/CarlaScopeUtils.hpp index 30e59da37..f00c2b01f 100644 --- a/source/utils/CarlaScopeUtils.hpp +++ b/source/utils/CarlaScopeUtils.hpp @@ -29,6 +29,10 @@ # define CARLA_USE_NEWLOCALE #endif +#if defined(CARLA_OS_WIN) && __MINGW64_VERSION_MAJOR >= 5 +# define CARLA_USE_CONFIGTHREADLOCALE +#endif + // ----------------------------------------------------------------------- // CarlaScopedEnvVar class @@ -103,7 +107,7 @@ public: : newloc(::newlocale(LC_NUMERIC_MASK, "C", kNullLocale)), oldloc(newloc != kNullLocale ? ::uselocale(newloc) : kNullLocale) {} #else -# ifdef CARLA_OS_WIN +# ifdef CARLA_USE_CONFIGTHREADLOCALE : oldthreadloc(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)), # else : oldthreadloc(-1), @@ -128,7 +132,7 @@ public: delete[] oldloc; } -# ifdef CARLA_OS_WIN +# ifdef CARLA_USE_CONFIGTHREADLOCALE if (oldthreadloc != -1) _configthreadlocale(oldthreadloc); # endif