From: Arvin Schnell Date: Thu, 24 Apr 2025 10:29:28 +0000 (+0200) Subject: - pick boost process v1 when compiling with boost 1.88 or higher X-Git-Tag: v0.13.0~126^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1006%2Fhead;p=thirdparty%2Fsnapper.git - pick boost process v1 when compiling with boost 1.88 or higher --- diff --git a/package/snapper.changes b/package/snapper.changes index 840bd8aa..31c1d075 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 24 12:20:13 CEST 2025 - aschnell@suse.com + +- pick boost process v1 when compiling with boost 1.88 or higher + ------------------------------------------------------------------- Mon Apr 07 10:05:23 CEST 2025 - aschnell@suse.com diff --git a/zypp-plugin/forwarding-zypp-plugin.cc b/zypp-plugin/forwarding-zypp-plugin.cc index 0eb0b522..a7463e74 100644 --- a/zypp-plugin/forwarding-zypp-plugin.cc +++ b/zypp-plugin/forwarding-zypp-plugin.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 SUSE LLC + * Copyright (c) [2020-2025] SUSE LLC * * All Rights Reserved. * @@ -21,7 +21,15 @@ #include + +#include +#if BOOST_VERSION < 108800 #include +#else +#define BOOST_PROCESS_VERSION 1 +#include +#include +#endif #include "zypp-plugin.h" @@ -60,9 +68,7 @@ ForwardingZyppPlugin::ForwardingZyppPlugin(const string& another_plugin) int ForwardingZyppPlugin::main() { - bp::child c(child_program, - bp::std_out > child_out, - bp::std_in < child_in); + bp::child child(child_program, bp::std_out > child_out, bp::std_in < child_in); return ZyppPlugin::main(); } @@ -72,6 +78,7 @@ ZyppPlugin::Message ForwardingZyppPlugin::dispatch(const Message& msg) { write_message(child_in, msg); + return read_message(child_out); } @@ -83,5 +90,6 @@ main(int argc, char** argv) throw runtime_error("Usage: forwarding-zypp-plugin ANOTHER_ZYPP_PLUGIN"); ForwardingZyppPlugin plugin(argv[1]); + return plugin.main(); }