mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 09:47:56 +08:00
Merge pull request #501 from chazmcgarvey/conditional-eproto
do not use EPROTO on platforms that do not have it
This commit is contained in:
commit
eeaa2c8e42
@ -195,8 +195,13 @@ 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 || errno == EPROTO ||
|
||||
errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
|
||||
errno == ENFILE);
|
||||
return retired_fd;
|
||||
}
|
||||
|
@ -262,8 +262,13 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
|
||||
win_assert (brc);
|
||||
#else
|
||||
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 || errno == EPROTO ||
|
||||
errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
|
||||
errno == ENOBUFS || errno == ENOMEM || errno == EMFILE ||
|
||||
errno == ENFILE);
|
||||
return retired_fd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user