summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-support/boost/boost/e8b0445e9837e232047173ddf6b4d541b1585915.patch
blob: 8bdacc5df778cfeddcaa98fde1a16d3f39646e0a (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
From 5308ba9daf66c50f950834c1469268f9d297f51a Mon Sep 17 00:00:00 2001
From: Bruno Abinader <brunoabinader@gmail.com>
Date: Thu, 3 Sep 2020 12:04:08 +0300
Subject: [PATCH 1/1] Enable ASIO builds without RTTI post 1.17.0

Signed-off-by: James Feist <james.feist@linux.intel.com>
---
 boost/asio/execution/any_executor.hpp | 23 +++++++++++++++++++++++
 boost/asio/io_context.hpp             | 12 ++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/boost/asio/execution/any_executor.hpp b/boost/asio/execution/any_executor.hpp
index 9c7018c88..c83f837a8 100644
--- a/boost/asio/execution/any_executor.hpp
+++ b/boost/asio/execution/any_executor.hpp
@@ -620,7 +620,11 @@ public:
     return static_cast<Executor*>(target_);
   }
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
   const std::type_info& target_type() const
+#else // !defined(BOOST_ASIO_NO_TYPEID)
+  const void* target_type() const
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
   {
     return target_fns_->target_type();
   }
@@ -800,16 +804,27 @@ protected:
 
   struct target_fns
   {
+#if !defined(BOOST_ASIO_NO_TYPEID)
     const std::type_info& (*target_type)();
+#else
+    const void* (*target_type)();
+#endif
     bool (*equal)(const any_executor_base&, const any_executor_base&);
     void (*execute)(const any_executor_base&, BOOST_ASIO_MOVE_ARG(function));
     void (*blocking_execute)(const any_executor_base&, function_view);
   };
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
   static const std::type_info& target_type_void()
   {
     return typeid(void);
   }
+#else
+  static const void* target_type_void()
+  {
+    return 0;
+  }
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
 
   static bool equal_void(const any_executor_base&, const any_executor_base&)
   {
@@ -845,11 +860,19 @@ protected:
     return &fns;
   }
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
   template <typename Ex>
   static const std::type_info& target_type_ex()
   {
     return typeid(Ex);
   }
+#else // !defined(BOOST_ASIO_NO_TYPEID)
+  template <typename Ex>
+  static const void* target_type_ex()
+  {
+    return 0;
+  }
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
 
   template <typename Ex>
   static bool equal_ex(const any_executor_base& ex1,
diff --git a/boost/asio/io_context.hpp b/boost/asio/io_context.hpp
index 6a64ef514..b5672b3d2 100644
--- a/boost/asio/io_context.hpp
+++ b/boost/asio/io_context.hpp
@@ -714,6 +714,18 @@ public:
       basic_executor_type&& other) BOOST_ASIO_NOEXCEPT;
 #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
+  static const std::type_info& type_id()
+  {
+    return typeid(basic_executor_type);
+#else // !defined(BOOST_ASIO_NO_TYPEID)
+  static const void* type_id()
+  {
+    static int unique_id;
+    return &unique_id;
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+  }
+
   /// Obtain an executor with the @c blocking.possibly property.
   /**
    * Do not call this function directly. It is intended for use with the
-- 
2.17.1