define a dummy EPROTO for platforms that don't use it

This accomplishes the same thing as 2e2ef7fd in a potentially cleaner way.
This commit is contained in:
Charles McGarvey
2013-01-21 17:14:26 -07:00
parent eeaa2c8e42
commit ba3e18f700
3 changed files with 7 additions and 12 deletions

View File

@@ -195,13 +195,8 @@ zmq::fd_t zmq::ipc_listener_t::accept ()
zmq_assert (s != retired_fd);
fd_t sock = ::accept (s, NULL, NULL);
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 == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
errno == EINTR || errno == ECONNABORTED || errno == EPROTO ||
errno == ENFILE);
return retired_fd;
}