]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- pick boost process v1 when compiling with boost 1.88 or higher 1006/head
authorArvin Schnell <aschnell@suse.de>
Thu, 24 Apr 2025 10:29:28 +0000 (12:29 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 24 Apr 2025 10:29:28 +0000 (12:29 +0200)
package/snapper.changes
zypp-plugin/forwarding-zypp-plugin.cc

index 840bd8aa67c61d585b01d3286ac416414b8b2614..31c1d07548c648aec97cbf5dc41e350a7de267d8 100644 (file)
@@ -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
 
index 0eb0b522db144039dfc7489294f581d7b502543e..a7463e742a7fbea61c919987336800ae6435aa71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 SUSE LLC
+ * Copyright (c) [2020-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
 
 
 #include <string>
+
+#include <boost/version.hpp>
+#if BOOST_VERSION < 108800
 #include <boost/process.hpp>
+#else
+#define BOOST_PROCESS_VERSION 1
+#include <boost/process/v1/child.hpp>
+#include <boost/process/v1/io.hpp>
+#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();
 }