From 3cc6144655306855a77d6c77ca9656633c7803d7 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sat, 21 Jul 2012 14:25:00 +0300 Subject: [PATCH] fixed: build with libshairport without ao_set_metadata Fix build with libshairport without the AudioOutput.ao_set_metadata and AudioOutput.ao_set_metadata_coverart members (which were added to libshairport git two months ago). A previous commit 537bec4 had already tried to do this, but it did not work properly and was therefore reverted in f58b70a. --- configure.in | 2 ++ xbmc/network/AirTunesServer.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.in b/configure.in index d44825f8aeaf9..eabf0528c5631 100755 --- a/configure.in +++ b/configure.in @@ -1197,6 +1197,8 @@ if test "x$use_airtunes" != "xno"; then if test "x$use_airtunes" != "xno"; then XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes]) USE_AIRTUNES=1 + AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,, + [[#include ]]) fi fi diff --git a/xbmc/network/AirTunesServer.cpp b/xbmc/network/AirTunesServer.cpp index 2ad097e8e5473..11dd67c5fe3f2 100644 --- a/xbmc/network/AirTunesServer.cpp +++ b/xbmc/network/AirTunesServer.cpp @@ -667,8 +667,10 @@ bool CAirTunesServer::Initialize(const CStdString &password) ao.ao_append_option = AudioOutputFunctions::ao_append_option; ao.ao_free_options = AudioOutputFunctions::ao_free_options; ao.ao_get_option = AudioOutputFunctions::ao_get_option; +#ifdef HAVE_STRUCT_AUDIOOUTPUT_AO_SET_METADATA ao.ao_set_metadata = AudioOutputFunctions::ao_set_metadata; ao.ao_set_metadata_coverart = AudioOutputFunctions::ao_set_metadata_coverart; +#endif struct printfPtr funcPtr; funcPtr.extprintf = shairport_log;