From 754f4048a8ab2e4c698ef74c042dd839f369a47b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Jan 2019 14:36:43 +0100 Subject: [PATCH] output/shout: evaluate `tls` option only if TLS is enabled in libshout Fixes build failure after commit 0cea67ee706d73acbd07a48e5d3b758ba016c1a8 --- src/output/plugins/ShoutOutputPlugin.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 81ba5fe42..eec956d2a 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -141,6 +141,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block) protocol = SHOUT_PROTOCOL_HTTP; } +#ifdef SHOUT_TLS unsigned tls; value = block.GetBlockValue("tls"); if (value != nullptr) { @@ -159,6 +160,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block) } else { tls = SHOUT_TLS_DISABLED; } +#endif if (shout_set_host(shout_conn, host) != SHOUTERR_SUCCESS || shout_set_port(shout_conn, port) != SHOUTERR_SUCCESS || @@ -170,7 +172,9 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block) shout_set_format(shout_conn, shout_format) != SHOUTERR_SUCCESS || shout_set_protocol(shout_conn, protocol) != SHOUTERR_SUCCESS || +#ifdef SHOUT_TLS shout_set_tls(shout_conn, tls) != SHOUTERR_SUCCESS || +#endif shout_set_agent(shout_conn, "MPD") != SHOUTERR_SUCCESS) throw std::runtime_error(shout_get_error(shout_conn));