summaryrefslogtreecommitdiff
path: root/src/epoll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/epoll.cpp')
-rw-r--r--src/epoll.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/epoll.cpp b/src/epoll.cpp
index 8f576f8..b25883f 100644
--- a/src/epoll.cpp
+++ b/src/epoll.cpp
@@ -26,6 +26,7 @@
#include <string.h>
#include <unistd.h>
#include <algorithm>
+#include <new>
#include "epoll.hpp"
#include "err.hpp"
@@ -54,7 +55,7 @@ zmq::epoll_t::~epoll_t ()
zmq::epoll_t::handle_t zmq::epoll_t::add_fd (fd_t fd_, i_poll_events *events_)
{
- poll_entry_t *pe = new poll_entry_t;
+ poll_entry_t *pe = new (std::nothrow) poll_entry_t;
zmq_assert (pe != NULL);
// The memset is not actually needed. It's here to prevent debugging