Commit 30f0ba09 authored by Dominik Charousset's avatar Dominik Charousset

fixed Linux-specific middleman impl

parent 7a9e3312
...@@ -27,7 +27,13 @@ ...@@ -27,7 +27,13 @@
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. * * along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/ \******************************************************************************/
#include <ios>
#include <string>
#include <vector>
#include <string.h>
#include <sys/epoll.h> #include <sys/epoll.h>
#include "cppa/network/middleman_event_handler.hpp" #include "cppa/network/middleman_event_handler.hpp"
namespace cppa { namespace network { namespace cppa { namespace network {
...@@ -44,8 +50,10 @@ class middleman_event_handler_impl : public middleman_event_handler { ...@@ -44,8 +50,10 @@ class middleman_event_handler_impl : public middleman_event_handler {
void init() { void init() {
m_epollfd = epoll_create1(EPOLL_CLOEXEC); m_epollfd = epoll_create1(EPOLL_CLOEXEC);
if (m_epollfd == -1) throw ios_base::failure( string("epoll_create1: ") if (m_epollfd == -1) {
+ strerror(errno)); throw std::ios_base::failure( std::string("epoll_create1: ")
+ strerror(errno));
}
// handle at most 64 events at a time // handle at most 64 events at a time
m_epoll_events.resize(64); m_epoll_events.resize(64);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment