0
0
Fork 0
haikuports/media-sound/fluidsynth/patches/fluidsynth2-2.1.8-gcc2.patc...

43 lines
1.7 KiB
Plaintext

From 1eff2e12357cfd1abf9379276aa769d8aa0c0876 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 22 Jun 2019 08:26:38 +0200
Subject: Fix gcc2 build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba2bcb5..ef78bd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,7 +189,7 @@ if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_C
endif ( NOT APPLE AND NOT OS2 )
# define some warning flags
- set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration" )
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes" )
check_c_compiler_flag ( "-Werror=incompatible-pointer-types" HAVE_INCOMPATIBLE_POINTER_TYPES )
if ( HAVE_INCOMPATIBLE_POINTER_TYPES )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types" )
diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c
index ea26ed5..8f0078f 100644
--- a/src/synth/fluid_synth.c
+++ b/src/synth/fluid_synth.c
@@ -209,6 +209,7 @@ void fluid_synth_settings(fluid_settings_t *settings)
fluid_settings_register_str(settings, "midi.portname", "", 0);
#ifdef __HAIKU__
+ {
char midiSettings[PATH_MAX] = "";
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, midiSettings, sizeof(midiSettings)) == B_OK) {
strcat(midiSettings, "/Media/midi_settings");
@@ -223,6 +224,7 @@ void fluid_synth_settings(fluid_settings_t *settings)
}
}
}
+ }
#else
#ifdef DEFAULT_SOUNDFONT
fluid_settings_register_str(settings, "synth.default-soundfont", DEFAULT_SOUNDFONT, 0);
--
2.30.0