Commit 2e2ef7fd authored by Charles McGarvey's avatar Charles McGarvey

do not use EPROTO on platforms that do not have it

parent 3a632185
...@@ -195,8 +195,13 @@ zmq::fd_t zmq::ipc_listener_t::accept () ...@@ -195,8 +195,13 @@ zmq::fd_t zmq::ipc_listener_t::accept ()
zmq_assert (s != retired_fd); zmq_assert (s != retired_fd);
fd_t sock = ::accept (s, NULL, NULL); fd_t sock = ::accept (s, NULL, NULL);
if (sock == -1) { if (sock == -1) {
#ifdef EPROTO
#define OR_ERRNO_EQ_EPROTO || errno == EPROTO
#else
#define OR_ERRNO_EQ_EPROTO
#endif
errno_assert (errno == EAGAIN || errno == EWOULDBLOCK || errno_assert (errno == EAGAIN || errno == EWOULDBLOCK ||
errno == EINTR || errno == ECONNABORTED || errno == EPROTO || errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
errno == ENFILE); errno == ENFILE);
return retired_fd; return retired_fd;
} }
......
...@@ -262,8 +262,13 @@ zmq::fd_t zmq::tcp_listener_t::accept () ...@@ -262,8 +262,13 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
win_assert (brc); win_assert (brc);
#else #else
if (sock == -1) { if (sock == -1) {
#ifdef EPROTO
#define OR_ERRNO_EQ_EPROTO || errno == EPROTO
#else
#define OR_ERRNO_EQ_EPROTO
#endif
errno_assert (errno == EAGAIN || errno == EWOULDBLOCK || errno_assert (errno == EAGAIN || errno == EWOULDBLOCK ||
errno == EINTR || errno == ECONNABORTED || errno == EPROTO || errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
errno == ENOBUFS || errno == ENOMEM || errno == EMFILE || errno == ENOBUFS || errno == ENOMEM || errno == EMFILE ||
errno == ENFILE); errno == ENFILE);
return retired_fd; return retired_fd;
......
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