mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 07:16:04 +00:00
do not use EPROTO on platforms that do not have it
This commit is contained in:
parent
3a632185a6
commit
2e2ef7fd33
@ -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 ()
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user