From 005e6913395f5ec2d8838667f8987e1eaf7b5de2 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Tue, 23 Oct 2018 18:44:28 +0200
Subject: [PATCH] decoder/fluidsynth: adapt to API change in version 2.0

Closes #360
---
 NEWS                                            | 2 ++
 src/decoder/plugins/FluidsynthDecoderPlugin.cxx | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index dae501a4f..6553fbef0 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ ver 0.20.22 (not yet released)
   - fix broken command "list ... group"
 * storage
   - curl: URL-encode paths
+* decoder
+  - fluidsynth: adapt to API change in version 2.0
 * Android
   - now runs as a service
   - add button to start/stop MPD
diff --git a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
index 3eaf1d67e..88a841142 100644
--- a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
+++ b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
@@ -64,7 +64,12 @@ fluidsynth_level_to_mpd(enum fluid_log_level level)
  * logging library.
  */
 static void
-fluidsynth_mpd_log_function(int level, char *message, gcc_unused void *data)
+fluidsynth_mpd_log_function(int level,
+#if FLUIDSYNTH_VERSION_MAJOR >= 2
+			    const
+#endif
+			    char *message,
+			    void *)
 {
 	Log(fluidsynth_domain,
 	    fluidsynth_level_to_mpd(fluid_log_level(level)),