43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
|
From a28b89dd848a4effdee601576cad42f982454039 Mon Sep 17 00:00:00 2001
|
||
|
From: D G Turner <digitall@scummvm.org>
|
||
|
Date: Tue, 17 Dec 2019 04:21:04 +0000
|
||
|
Subject: [PATCH] AUDIO: Really Fix Compilation Against Fluidsynth v2.1+
|
||
|
|
||
|
The previous fix did not work as the forbidden exception had no effect
|
||
|
since scummsys.h and thus forbidden.h had already been included prior
|
||
|
to the fluidsynth header being included. This also meant that undefining
|
||
|
the exception define after the header would have had no effect anyway.
|
||
|
|
||
|
This new solution was suggest by eriktorbjorn on bug #11278 and should
|
||
|
avoid the need to add an exception which would persist over the entire
|
||
|
source file.
|
||
|
---
|
||
|
audio/softsynth/fluidsynth.cpp | 8 +++++++-
|
||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
|
||
|
index 4034b2f..21891d6 100644
|
||
|
--- a/audio/softsynth/fluidsynth.cpp
|
||
|
+++ b/audio/softsynth/fluidsynth.cpp
|
||
|
@@ -20,10 +20,16 @@
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
-#include "common/scummsys.h"
|
||
|
+#include "config.h"
|
||
|
|
||
|
#ifdef USE_FLUIDSYNTH
|
||
|
|
||
|
+// Fluidsynth v2.1+ uses printf in one of it's headers,
|
||
|
+// include/fluidsynth/log.h around line 82 so need to include this
|
||
|
+// prior scummsys.h inclusion and thus forbidden.h
|
||
|
+#include <fluidsynth.h>
|
||
|
+
|
||
|
+#include "common/scummsys.h"
|
||
|
#include "common/config-manager.h"
|
||
|
#include "common/error.h"
|
||
|
#include "common/system.h"
|
||
|
--
|
||
|
2.24.1
|
||
|
|