mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
boost: backport fix to make async_pipes work with asio
async_pipe is missing the executor_type type, which is expected by
asio in /usr/include/boost/asio/impl/read.hpp. Without this, it's
not possible to even compile code that uses constructs such as:
boost::asio::io_service foo;
boost::process::async_pipe foopipe{ boost::process::async_pipe(foo) };
This is only relevant for Dunfell because master has already moved to
boost-1.73.0 in which this bug has been fixed. The bug is also not
present in Zeus, which uses boost-1.71.0.
(From OE-Core rev: f3f6cc45b0b95cce337947df8dfaa9402251541c)
Signed-off-by: Viktor Rosendahl <Viktor.Rosendahl@bmw.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
aba2fdcff2
commit
04d21a9ac5
@@ -0,0 +1,54 @@
|
||||
From 6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0 Mon Sep 17 00:00:00 2001
|
||||
From: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
|
||||
Date: Fri, 22 Nov 2019 14:03:22 +0800
|
||||
Subject: [PATCH] added typedef executor_type;
|
||||
|
||||
Upstream-Status: Backport [https://github.com/boostorg/process/commit/6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0]
|
||||
|
||||
Signed-off-by: Viktor Rosendahl <Viktor.Rosendahl@bmw.de>
|
||||
---
|
||||
include/boost/process/async_pipe.hpp | 2 ++
|
||||
include/boost/process/detail/posix/async_pipe.hpp | 1 +
|
||||
include/boost/process/detail/windows/async_pipe.hpp | 1 +
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/include/boost/process/async_pipe.hpp b/include/boost/process/async_pipe.hpp
|
||||
index 101fe1d..a562432 100644
|
||||
--- a/boost/process/async_pipe.hpp
|
||||
+++ b/boost/process/async_pipe.hpp
|
||||
@@ -47,6 +47,8 @@ public:
|
||||
*/
|
||||
typedef platform_specific handle_type;
|
||||
|
||||
+ typedef typename handle_type::executor_type executor_type;
|
||||
+
|
||||
/** Construct a new async_pipe, does automatically open the pipe.
|
||||
* Initializes source and sink with the same io_context.
|
||||
* @note Windows creates a named pipe here, where the name is automatically generated.
|
||||
diff --git a/include/boost/process/detail/posix/async_pipe.hpp b/include/boost/process/detail/posix/async_pipe.hpp
|
||||
index 725a078..a82c057 100644
|
||||
--- a/boost/process/detail/posix/async_pipe.hpp
|
||||
+++ b/boost/process/detail/posix/async_pipe.hpp
|
||||
@@ -23,6 +23,7 @@ class async_pipe
|
||||
public:
|
||||
typedef int native_handle_type;
|
||||
typedef ::boost::asio::posix::stream_descriptor handle_type;
|
||||
+ typedef typename handle_type::executor_type executor_type;
|
||||
|
||||
inline async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios) {}
|
||||
|
||||
diff --git a/include/boost/process/detail/windows/async_pipe.hpp b/include/boost/process/detail/windows/async_pipe.hpp
|
||||
index 06d5f2d..0b447f9 100644
|
||||
--- a/boost/process/detail/windows/async_pipe.hpp
|
||||
+++ b/boost/process/detail/windows/async_pipe.hpp
|
||||
@@ -48,6 +48,7 @@ class async_pipe
|
||||
public:
|
||||
typedef ::boost::winapi::HANDLE_ native_handle_type;
|
||||
typedef ::boost::asio::windows::stream_handle handle_type;
|
||||
+ typedef typename handle_type::executor_type executor_type;
|
||||
|
||||
async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios, make_pipe_name(), true) {}
|
||||
async_pipe(boost::asio::io_context & ios_source, boost::asio::io_context & ios_sink)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -8,4 +8,5 @@ SRC_URI += "file://arm-intrinsics.patch \
|
||||
file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
|
||||
file://0001-dont-setup-compiler-flags-m32-m64.patch \
|
||||
file://0001-revert-cease-dependence-on-range.patch \
|
||||
file://0001-added-typedef-executor_type.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user