Skip to content

Commit a701a2e

Browse files
committed
snapcast: fix compilation with boost 1.88.0
Boost upgrade hit Snapcast hard again: the process needs to be updated! This patch is a patchset from badaix/snapcast@develop. It is based on the following upstream commits: snapcast/snapcast@901b79a213b1 ("Build failure with boost 1.88.0 #1367") snapcast/snapcast@ffb086b4b331 ("Define BOOST_PROCESS_VERSION=1 globally") snapcast/snapcast@c37a76a4aba9 ("Add missing includes") snapcast/snapcast@571f6a8f6953 ("Include process v1 headers for Boost version >= v1.88.0") Refs: 3585ddf ("boost: Updates package to version 1.88.0") Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
1 parent ae8269b commit a701a2e

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
From 901b79a213b139c35ff689c05aff01d29610a8d4 Mon Sep 17 00:00:00 2001
2+
From: Tobias Hochwallner <tobster@gmx.at>
3+
Date: Wed, 7 May 2025 22:42:07 +0200
4+
Subject: Build failure with boost 1.88.0 #1367
5+
1. [tobster] fix compilation errors by including the deprecated boost process v1 APIs
6+
2. [badaix] Define BOOST_PROCESS_VERSION=1 globally
7+
8+
---
9+
client/player/player.cpp | 6 +++++-
10+
server/streamreader/stream_control.hpp | 8 +++++---
11+
2 files changed, 10 insertions(+), 4 deletions(-)
12+
13+
--- a/client/player/player.cpp
14+
+++ b/client/player/player.cpp
15+
@@ -34,10 +34,17 @@
16+
#pragma GCC diagnostic ignored "-Wmissing-braces"
17+
#pragma GCC diagnostic ignored "-Wnarrowing"
18+
#pragma GCC diagnostic ignored "-Wc++11-narrowing"
19+
+#if BOOST_VERSION >= 108800
20+
+#include <boost/process/v1/args.hpp>
21+
+#include <boost/process/v1/async.hpp>
22+
+#include <boost/process/v1/child.hpp>
23+
+#include <boost/process/v1/exe.hpp>
24+
+#else
25+
#include <boost/process/args.hpp>
26+
#include <boost/process/async.hpp>
27+
#include <boost/process/child.hpp>
28+
#include <boost/process/exe.hpp>
29+
+#endif
30+
#pragma GCC diagnostic pop
31+
#endif
32+
33+
--- a/server/streamreader/stream_control.hpp
34+
+++ b/server/streamreader/stream_control.hpp
35+
@@ -32,7 +32,13 @@
36+
#pragma GCC diagnostic ignored "-Wnarrowing"
37+
#pragma GCC diagnostic ignored "-Wc++11-narrowing"
38+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
39+
+#if BOOST_VERSION >= 108800
40+
+#include <boost/process/v1/io.hpp>
41+
+#include <boost/process/v1/start_dir.hpp>
42+
+#include <boost/process/v1/system.hpp>
43+
+#else
44+
#include <boost/process.hpp>
45+
+#endif
46+
#pragma GCC diagnostic pop
47+
#include <boost/asio/any_io_executor.hpp>
48+
49+
--- a/CMakeLists.txt
50+
+++ b/CMakeLists.txt
51+
@@ -318,7 +318,8 @@ else()
52+
add_compile_definitions(HAS_TREMOR)
53+
endif()
54+
55+
-add_compile_definitions(BOOST_ERROR_CODE_HEADER_ONLY BOOST_ASIO_NO_TS_EXECUTORS)
56+
+add_compile_definitions(BOOST_ERROR_CODE_HEADER_ONLY BOOST_ASIO_NO_TS_EXECUTORS
57+
+ BOOST_PROCESS_VERSION=1)
58+
59+
if(WIN32)
60+
include(FindPackageHandleStandardArgs)

0 commit comments

Comments
 (0)