summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch
blob: 9262381d5bd812ee07b03eaf184d081972059dda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
From 4fd11ef050438adeb1e0ae0d9d2d8ec3a2cb659c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <bpiotrowski@archlinux.org>
Date: Sat, 30 Dec 2017 14:40:24 +0100
Subject: [PATCH] asiolink: fix build with boost 1.66

- use native_handle() for getting native socket type
- use io_context instead of io_service

Upstream-Status: Backport

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
 src/lib/asiolink/io_acceptor.h         | 4 ++++
 src/lib/asiolink/io_service.h          | 5 +++++
 src/lib/asiolink/tcp_socket.h          | 4 ++++
 src/lib/asiolink/udp_socket.h          | 4 ++++
 src/lib/asiolink/unix_domain_socket.cc | 4 ++++
 5 files changed, 21 insertions(+)

diff --git a/src/lib/asiolink/io_acceptor.h b/src/lib/asiolink/io_acceptor.h
index c493d3427..913a3280b 100644
--- a/src/lib/asiolink/io_acceptor.h
+++ b/src/lib/asiolink/io_acceptor.h
@@ -47,7 +47,11 @@ public:
 
     /// @brief Returns file descriptor of the underlying socket.
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (acceptor_->native());
+#else
+        return (acceptor_->native_handle());
+#endif
     }
 
     /// @brief Opens acceptor socket given the endpoint.
diff --git a/src/lib/asiolink/io_service.h b/src/lib/asiolink/io_service.h
index e9e402d11..e0832b2c0 100644
--- a/src/lib/asiolink/io_service.h
+++ b/src/lib/asiolink/io_service.h
@@ -11,7 +11,12 @@
 
 namespace boost {
 namespace asio {
+#if BOOST_VERSION < 106600
     class io_service;
+#else
+    class io_context;
+    typedef io_context io_service;
+#endif
 }
 }
 
diff --git a/src/lib/asiolink/tcp_socket.h b/src/lib/asiolink/tcp_socket.h
index adf74d1f0..83b8264c8 100644
--- a/src/lib/asiolink/tcp_socket.h
+++ b/src/lib/asiolink/tcp_socket.h
@@ -75,7 +75,11 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (socket_.native());
+#else
+        return (socket_.native_handle());
+#endif
     }
 
     /// \brief Return protocol of socket
diff --git a/src/lib/asiolink/udp_socket.h b/src/lib/asiolink/udp_socket.h
index 07ba44743..5b040cfe1 100644
--- a/src/lib/asiolink/udp_socket.h
+++ b/src/lib/asiolink/udp_socket.h
@@ -61,7 +61,11 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (socket_.native());
+#else
+        return (socket_.native_handle());
+#endif
     }
 
     /// \brief Return protocol of socket
diff --git a/src/lib/asiolink/unix_domain_socket.cc b/src/lib/asiolink/unix_domain_socket.cc
index f17ec2e8f..d1ad9ec30 100644
--- a/src/lib/asiolink/unix_domain_socket.cc
+++ b/src/lib/asiolink/unix_domain_socket.cc
@@ -287,7 +287,11 @@ UnixDomainSocket::UnixDomainSocket(IOService& io_service)
 
 int
 UnixDomainSocket::getNative() const {
+#if BOOST_VERSION < 106600
     return (impl_->socket_.native());
+#else
+    return (impl_->socket_.native_handle());
+#endif
 }
 
 int
-- 
2.11.0