Fixes for FreeBSD

This commit is contained in:
Vinnie Falco
2013-09-27 07:14:20 -07:00
parent 54dc7017e1
commit 0048efea8d
4 changed files with 15 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ public:
void write (std::string const& s)
{
if (! s.empty())
write (&s.front(),
write (&s[0],
std::distance (s.begin(), s.end()));
}

View File

@@ -147,7 +147,7 @@ public:
m_parser.request()->body ());
s.resize (body.size ());
boost::asio::buffer_copy (
boost::asio::buffer (&s.front(),
boost::asio::buffer (&s[0],
s.size()), body.data());
return s;
}
@@ -482,7 +482,7 @@ public:
// count will drop to zero and the buffer will be freed.
//
boost::asio::async_write (*m_socket,
boost::asio::const_buffers_1 (&buf->front(), buf->size()),
boost::asio::const_buffers_1 (&(*buf)[0], buf->size()),
m_strand.wrap (boost::bind (&Peer::handle_write,
Ptr (this), boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred,