From dfc95bffff910002bb112bc046cd0de24368a8ff Mon Sep 17 00:00:00 2001 From: carlo-bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Sun, 25 Mar 2018 13:31:35 +0200 Subject: [PATCH 1/4] Add conditional inclusion for signal.h HAVE_SIGNAL_H macro is already handled by CMAKE, but signal.h is not included here (it's required for LASH). --- src/utils/fluidsynth_priv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/fluidsynth_priv.h b/src/utils/fluidsynth_priv.h index 2bdda93b..f48bed7a 100644 --- a/src/utils/fluidsynth_priv.h +++ b/src/utils/fluidsynth_priv.h @@ -106,6 +106,10 @@ #include #endif +#if HAVE_SIGNAL_H +#include +#endif + /** Integer types */ #if HAVE_STDINT_H #include From e1038e253e4f46840475f0d9c7e124de7dde41cf Mon Sep 17 00:00:00 2001 From: carlo-bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Sun, 25 Mar 2018 13:40:57 +0200 Subject: [PATCH 2/4] Remove redundant includes. "fluid_synth.h" is already included by "fluid_lash.h". "fluidsynth_priv.h" already includes all these files, with the conditional inclusion. --- src/bindings/fluid_lash.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bindings/fluid_lash.c b/src/bindings/fluid_lash.c index 34d68398..1178c271 100644 --- a/src/bindings/fluid_lash.c +++ b/src/bindings/fluid_lash.c @@ -18,14 +18,8 @@ * 02110-1301, USA */ #include "fluid_lash.h" -#include "fluid_synth.h" -#include /* for usleep() */ -#include -#include -#include -#include -#include +#ifdef HAVE_LASH static void fluid_lash_save (fluid_synth_t * synth); static void fluid_lash_load (fluid_synth_t * synth, const char * filename); @@ -35,15 +29,11 @@ static void *fluid_lash_run (void * data); * lash client - this symbol needs to be in the library else * all clients would need a fluid_lash_client symbol. */ -#ifdef HAVE_LASH lash_client_t * fluid_lash_client; -#endif static pthread_t fluid_lash_thread; -#ifdef HAVE_LASH - fluid_lash_args_t * fluid_lash_extract_args (int * pargc, char *** pargv) { From 1fcf81fbc429e460fe8991e2db640ae8e3c9e3a3 Mon Sep 17 00:00:00 2001 From: carlo-bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Sun, 25 Mar 2018 13:44:37 +0200 Subject: [PATCH 3/4] Remove redundant includes These files are already included by "fluid_synth.h" --- src/drivers/fluid_dsound.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/drivers/fluid_dsound.c b/src/drivers/fluid_dsound.c index 24635625..2c784f32 100644 --- a/src/drivers/fluid_dsound.c +++ b/src/drivers/fluid_dsound.c @@ -21,9 +21,7 @@ #define INITGUID -#include "fluidsynth_priv.h" #include "fluid_synth.h" -#include "fluid_sys.h" #include "fluid_adriver.h" #include "fluid_settings.h" #include From 3825d666d81dffa7c9f7ddb0c41c3a9715ec57eb Mon Sep 17 00:00:00 2001 From: carlo-bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Sun, 25 Mar 2018 13:46:30 +0200 Subject: [PATCH 4/4] Build only if DSOUND_SUPPORT is defined --- src/drivers/fluid_dsound.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/drivers/fluid_dsound.c b/src/drivers/fluid_dsound.c index 2c784f32..16363838 100644 --- a/src/drivers/fluid_dsound.c +++ b/src/drivers/fluid_dsound.c @@ -19,11 +19,14 @@ */ -#define INITGUID - #include "fluid_synth.h" #include "fluid_adriver.h" #include "fluid_settings.h" + +#if DSOUND_SUPPORT + +#define INITGUID + #include #include @@ -366,3 +369,5 @@ char* fluid_win32_error(HRESULT hr) { } return s; } + +#endif /* DSOUND_SUPPORT */