summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch')
-rw-r--r--meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch b/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch
new file mode 100644
index 0000000000..9262381d5b
--- /dev/null
+++ b/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch
@@ -0,0 +1,103 @@
1From 4fd11ef050438adeb1e0ae0d9d2d8ec3a2cb659c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <bpiotrowski@archlinux.org>
3Date: Sat, 30 Dec 2017 14:40:24 +0100
4Subject: [PATCH] asiolink: fix build with boost 1.66
5
6- use native_handle() for getting native socket type
7- use io_context instead of io_service
8
9Upstream-Status: Backport
10
11Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
12---
13 src/lib/asiolink/io_acceptor.h | 4 ++++
14 src/lib/asiolink/io_service.h | 5 +++++
15 src/lib/asiolink/tcp_socket.h | 4 ++++
16 src/lib/asiolink/udp_socket.h | 4 ++++
17 src/lib/asiolink/unix_domain_socket.cc | 4 ++++
18 5 files changed, 21 insertions(+)
19
20diff --git a/src/lib/asiolink/io_acceptor.h b/src/lib/asiolink/io_acceptor.h
21index c493d3427..913a3280b 100644
22--- a/src/lib/asiolink/io_acceptor.h
23+++ b/src/lib/asiolink/io_acceptor.h
24@@ -47,7 +47,11 @@ public:
25
26 /// @brief Returns file descriptor of the underlying socket.
27 virtual int getNative() const {
28+#if BOOST_VERSION < 106600
29 return (acceptor_->native());
30+#else
31+ return (acceptor_->native_handle());
32+#endif
33 }
34
35 /// @brief Opens acceptor socket given the endpoint.
36diff --git a/src/lib/asiolink/io_service.h b/src/lib/asiolink/io_service.h
37index e9e402d11..e0832b2c0 100644
38--- a/src/lib/asiolink/io_service.h
39+++ b/src/lib/asiolink/io_service.h
40@@ -11,7 +11,12 @@
41
42 namespace boost {
43 namespace asio {
44+#if BOOST_VERSION < 106600
45 class io_service;
46+#else
47+ class io_context;
48+ typedef io_context io_service;
49+#endif
50 }
51 }
52
53diff --git a/src/lib/asiolink/tcp_socket.h b/src/lib/asiolink/tcp_socket.h
54index adf74d1f0..83b8264c8 100644
55--- a/src/lib/asiolink/tcp_socket.h
56+++ b/src/lib/asiolink/tcp_socket.h
57@@ -75,7 +75,11 @@ public:
58
59 /// \brief Return file descriptor of underlying socket
60 virtual int getNative() const {
61+#if BOOST_VERSION < 106600
62 return (socket_.native());
63+#else
64+ return (socket_.native_handle());
65+#endif
66 }
67
68 /// \brief Return protocol of socket
69diff --git a/src/lib/asiolink/udp_socket.h b/src/lib/asiolink/udp_socket.h
70index 07ba44743..5b040cfe1 100644
71--- a/src/lib/asiolink/udp_socket.h
72+++ b/src/lib/asiolink/udp_socket.h
73@@ -61,7 +61,11 @@ public:
74
75 /// \brief Return file descriptor of underlying socket
76 virtual int getNative() const {
77+#if BOOST_VERSION < 106600
78 return (socket_.native());
79+#else
80+ return (socket_.native_handle());
81+#endif
82 }
83
84 /// \brief Return protocol of socket
85diff --git a/src/lib/asiolink/unix_domain_socket.cc b/src/lib/asiolink/unix_domain_socket.cc
86index f17ec2e8f..d1ad9ec30 100644
87--- a/src/lib/asiolink/unix_domain_socket.cc
88+++ b/src/lib/asiolink/unix_domain_socket.cc
89@@ -287,7 +287,11 @@ UnixDomainSocket::UnixDomainSocket(IOService& io_service)
90
91 int
92 UnixDomainSocket::getNative() const {
93+#if BOOST_VERSION < 106600
94 return (impl_->socket_.native());
95+#else
96+ return (impl_->socket_.native_handle());
97+#endif
98 }
99
100 int
101--
1022.11.0
103