summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Rosendahl <Viktor.Rosendahl@bmw.de>2020-07-30 12:00:21 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-07 21:20:21 +0100
commit04d21a9ac51bc983cd89e43b4312c9f33076d239 (patch)
tree545bbb2615cad8e74c5f0d13ce91798fbba21974
parentaba2fdcff2a6ddb4ac1872d78ea14086485923c2 (diff)
downloadpoky-04d21a9ac51bc983cd89e43b4312c9f33076d239.tar.gz
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>
-rw-r--r--meta/recipes-support/boost/boost/0001-added-typedef-executor_type.patch54
-rw-r--r--meta/recipes-support/boost/boost_1.72.0.bb1
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost/0001-added-typedef-executor_type.patch b/meta/recipes-support/boost/boost/0001-added-typedef-executor_type.patch
new file mode 100644
index 0000000000..7b8178fd76
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-added-typedef-executor_type.patch
@@ -0,0 +1,54 @@
1From 6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0 Mon Sep 17 00:00:00 2001
2From: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
3Date: Fri, 22 Nov 2019 14:03:22 +0800
4Subject: [PATCH] added typedef executor_type;
5
6Upstream-Status: Backport [https://github.com/boostorg/process/commit/6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0]
7
8Signed-off-by: Viktor Rosendahl <Viktor.Rosendahl@bmw.de>
9---
10 include/boost/process/async_pipe.hpp | 2 ++
11 include/boost/process/detail/posix/async_pipe.hpp | 1 +
12 include/boost/process/detail/windows/async_pipe.hpp | 1 +
13 3 files changed, 4 insertions(+)
14
15diff --git a/include/boost/process/async_pipe.hpp b/include/boost/process/async_pipe.hpp
16index 101fe1d..a562432 100644
17--- a/boost/process/async_pipe.hpp
18+++ b/boost/process/async_pipe.hpp
19@@ -47,6 +47,8 @@ public:
20 */
21 typedef platform_specific handle_type;
22
23+ typedef typename handle_type::executor_type executor_type;
24+
25 /** Construct a new async_pipe, does automatically open the pipe.
26 * Initializes source and sink with the same io_context.
27 * @note Windows creates a named pipe here, where the name is automatically generated.
28diff --git a/include/boost/process/detail/posix/async_pipe.hpp b/include/boost/process/detail/posix/async_pipe.hpp
29index 725a078..a82c057 100644
30--- a/boost/process/detail/posix/async_pipe.hpp
31+++ b/boost/process/detail/posix/async_pipe.hpp
32@@ -23,6 +23,7 @@ class async_pipe
33 public:
34 typedef int native_handle_type;
35 typedef ::boost::asio::posix::stream_descriptor handle_type;
36+ typedef typename handle_type::executor_type executor_type;
37
38 inline async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios) {}
39
40diff --git a/include/boost/process/detail/windows/async_pipe.hpp b/include/boost/process/detail/windows/async_pipe.hpp
41index 06d5f2d..0b447f9 100644
42--- a/boost/process/detail/windows/async_pipe.hpp
43+++ b/boost/process/detail/windows/async_pipe.hpp
44@@ -48,6 +48,7 @@ class async_pipe
45 public:
46 typedef ::boost::winapi::HANDLE_ native_handle_type;
47 typedef ::boost::asio::windows::stream_handle handle_type;
48+ typedef typename handle_type::executor_type executor_type;
49
50 async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios, make_pipe_name(), true) {}
51 async_pipe(boost::asio::io_context & ios_source, boost::asio::io_context & ios_sink)
52--
532.17.1
54
diff --git a/meta/recipes-support/boost/boost_1.72.0.bb b/meta/recipes-support/boost/boost_1.72.0.bb
index 0b7badbc76..51c84bc935 100644
--- a/meta/recipes-support/boost/boost_1.72.0.bb
+++ b/meta/recipes-support/boost/boost_1.72.0.bb
@@ -8,4 +8,5 @@ SRC_URI += "file://arm-intrinsics.patch \
8 file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \ 8 file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
9 file://0001-dont-setup-compiler-flags-m32-m64.patch \ 9 file://0001-dont-setup-compiler-flags-m32-m64.patch \
10 file://0001-revert-cease-dependence-on-range.patch \ 10 file://0001-revert-cease-dependence-on-range.patch \
11 file://0001-added-typedef-executor_type.patch \
11 " 12 "