]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
boost: include more specific asio headers 19848/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 23 Jan 2018 15:49:31 +0000 (10:49 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 23 Jan 2018 17:39:51 +0000 (12:39 -0500)
when building with gcc5 and boost 1.66, this #include <boost/asio.hpp> fails to compile:

In file included from build/boost/include/boost/asio/impl/write.hpp:25:0,
                 from build/boost/include/boost/asio/write.hpp:927,
                 from build/boost/include/boost/asio/buffered_write_stream.hpp:29,
                 from build/boost/include/boost/asio/buffered_stream.hpp:22,
                 from build/boost/include/boost/asio.hpp:41,
                 from src/common/Graylog.h:7,
                 from src/common/LogClient.cc:20:
build/boost/include/boost/asio/detail/consuming_buffers.hpp: In member function ‘boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepared_buffers_type boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepare(std::size_t)’:
build/boost/include/boost/asio/detail/consuming_buffers.hpp:105:50: error: parse error in template argument list
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                  ^
src/CMakeFiles/common-objs.dir/build.make:135: recipe for target 'src/CMakeFiles/common-objs.dir/common/LogClient.cc.o' failed

see also: https://svn.boost.org/trac10/ticket/13368

this commit targets the luminous branch specifically because the issues
doesn't reproduce on master (as we require gcc7+)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/Graylog.h
src/rgw/rgw_coroutine.h

index 7e802a899572feb4f34aa2ebf461460ed95edad0..f17cf2653962c219abd109c8b745ab762a23531b 100644 (file)
@@ -4,7 +4,8 @@
 #ifndef __CEPH_LOG_GRAYLOG_H
 #define __CEPH_LOG_GRAYLOG_H
 
-#include <boost/asio.hpp>
+#include <boost/asio/ip/udp.hpp>
+#include <boost/asio/io_service.hpp>
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/filter/zlib.hpp>
 
index f84232875616236f1daa611a964b6dfa16379776..c6f017824d8f9d79f77486b391c1cef4e70c817f 100644 (file)
@@ -6,7 +6,6 @@
 #pragma push_macro("_ASSERT_H")
 #endif
 
-#include <boost/asio.hpp>
 #include <boost/intrusive_ptr.hpp>
 
 #ifdef NEED_ASSERT_H