From 272b29641b0f59b7dac4c7e7dd14af1992c908e5 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 9 Dec 2016 10:31:48 +0000 Subject: [PATCH] Add patch for Boost.Asio to fix allocator usage (#1403165) --- boost-1.60-asio-use-future.patch | 45 ++++++++++++++++++++++++++++++++ boost.spec | 9 ++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 boost-1.60-asio-use-future.patch diff --git a/boost-1.60-asio-use-future.patch b/boost-1.60-asio-use-future.patch new file mode 100644 index 0000000..1410509 --- /dev/null +++ b/boost-1.60-asio-use-future.patch @@ -0,0 +1,45 @@ +From 42e7869f411a75512fb6994c634eb086fb9eb5cc Mon Sep 17 00:00:00 2001 +From: Christopher Kohlhoff +Date: Sun, 11 Sep 2016 12:04:18 +1000 +Subject: [PATCH] Fix allocator usage to compile with g++ 6. + +--- + include/boost/asio/impl/use_future.hpp | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/include/boost/asio/impl/use_future.hpp b/include/boost/asio/impl/use_future.hpp +index b954e14..92106f4 100644 +--- a/include/boost/asio/impl/use_future.hpp ++++ b/include/boost/asio/impl/use_future.hpp +@@ -34,10 +34,12 @@ namespace detail { + { + public: + // Construct from use_future special value. +- template +- promise_handler(use_future_t uf) ++ template ++ promise_handler(use_future_t uf) + : promise_(std::allocate_shared >( +- uf.get_allocator(), std::allocator_arg, uf.get_allocator())) ++ typename Alloc::template rebind::other(uf.get_allocator()), ++ std::allocator_arg, ++ typename Alloc::template rebind::other(uf.get_allocator()))) + { + } + +@@ -66,10 +68,12 @@ namespace detail { + { + public: + // Construct from use_future special value. Used during rebinding. +- template +- promise_handler(use_future_t uf) ++ template ++ promise_handler(use_future_t uf) + : promise_(std::allocate_shared >( +- uf.get_allocator(), std::allocator_arg, uf.get_allocator())) ++ typename Alloc::template rebind::other(uf.get_allocator()), ++ std::allocator_arg, ++ typename Alloc::template rebind::other(uf.get_allocator()))) + { + } + diff --git a/boost.spec b/boost.spec index f3b4636..8c4aa32 100644 --- a/boost.spec +++ b/boost.spec @@ -38,7 +38,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.60.0 %global version_enc 1_60_0 -Release: 7%{?dist} +Release: 8%{?dist} License: Boost and MIT and Python %global toplev_dirname %{name}_%{version_enc} @@ -138,6 +138,9 @@ Patch83: boost-1.60-multiprecision.patch # https://github.com/boostorg/python/pull/59/files Patch84: boost-1.60-python-regptr.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1403165 +Patch85: boost-1.60-asio-use-future.patch + %bcond_with tests %bcond_with docs_generated @@ -650,6 +653,7 @@ a number of significant features and is now developed independently %patch81 -p2 %patch83 -p2 %patch84 -p2 +%patch85 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -1278,6 +1282,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Fri Dec 09 2016 Jonathan Wakely - 1.60.0-8 +- Add patch for Boost.Asio to fix allocator usage (#1403165) + * Mon Aug 01 2016 Jonathan Wakely - 1.60.0-7 - Add patch for Boost.Python to fix pointer registration (#1358725)