libevent 2.0 compat

This commit is contained in:
Michael Davidsaver
2020-03-20 09:23:06 -07:00
parent 320755ebd5
commit d452e009ce
6 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ Connection::Connection(const std::shared_ptr<Context::Pvt>& context, const SockA
timeval timo = {30, 0};
bufferevent_set_timeouts(bev.get(), &timo, &timo);
if(bufferevent_socket_connect(bev.get(), &peerAddr->sa, peerAddr.size()))
if(bufferevent_socket_connect(bev.get(), const_cast<sockaddr*>(&peerAddr->sa), peerAddr.size()))
throw std::runtime_error("Unable to begin connecting");
log_debug_printf(io, "Connecting to %s\n", peerName.c_str());