File Asio-Fixed-for-older-versions-of-Boost.patch of Package wt

From: Roel Standaert <roel@emweb.be>
Date: Tue Dec 19 18:41:22 2017 +0100
Subject: Asio: Fixed for older versions of Boost
Patch-mainline: Upstream
Git-repo: https://github.com/emweb/wt
Git-commit: 50864bc3d60cf6cf4e019d3eb25e8081b83393c5
References: boo#1074999


Signed-off-by: Egbert Eich <eich@suse.de>
---
 src/http/Connection.C | 7 +++++--
 src/http/Connection.h | 4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/http/Connection.C b/src/http/Connection.C
index 27380a8..a37ee9e 100644
--- a/src/http/Connection.C
+++ b/src/http/Connection.C
@@ -61,14 +61,17 @@ Connection::~Connection()
   LOG_DEBUG("~Connection");
 }
 
+#if (defined(WT_ASIO_IS_BOOST_ASIO) && BOOST_VERSION >= 106600) || (defined(WT_ASIO_IS_STANDALONE_ASIO) && ASIO_VERSION >= 101100)
 asio::ip::tcp::socket::native_handle_type Connection::native()
 {
-#if (defined(WT_ASIO_IS_BOOST_ASIO) && BOOST_VERSION >= 106600) || (defined(WT_ASIO_IS_STANDALONE_ASIO) && ASIO_VERSION >= 101100)
   return socket().native_handle();
+}
 #else
+asio::ip::tcp::socket::native_type Connection::native()
+{
   return socket().native();
-#endif
 }
+#endif
 
 void Connection::finishReply()
 { 
diff --git a/src/http/Connection.h b/src/http/Connection.h
index f925177..1abe1e4 100644
--- a/src/http/Connection.h
+++ b/src/http/Connection.h
@@ -88,7 +88,11 @@ public:
 
 protected:
   /// Get the native handle of the socket
+#if (defined(WT_ASIO_IS_BOOST_ASIO) && BOOST_VERSION >= 106600) || (defined(WT_ASIO_IS_STANDALONE_ASIO) && ASIO_VERSION >= 101100)
   asio::ip::tcp::socket::native_handle_type native();
+#else
+  asio::ip::tcp::socket::native_type native();
+#endif
 
   void handleWriteResponse0(ReplyPtr reply,
                             const Wt::AsioWrapper::error_code& e,
openSUSE Build Service is sponsored by