Unverified Commit 7a9933f2 authored by Simon Giesecke's avatar Simon Giesecke Committed by GitHub

Merge pull request #3179 from masariello/master

Problem: stack overflow on win64 #2876
parents 83e1712d 9066e067
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "poller.hpp" #include "poller.hpp"
#include "polling_util.hpp"
#if defined ZMQ_POLL_BASED_ON_POLL #if defined ZMQ_POLL_BASED_ON_POLL
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_AIX #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_AIX
...@@ -270,19 +271,21 @@ int zmq::signaler_t::wait (int timeout_) ...@@ -270,19 +271,21 @@ int zmq::signaler_t::wait (int timeout_)
#elif defined ZMQ_POLL_BASED_ON_SELECT #elif defined ZMQ_POLL_BASED_ON_SELECT
fd_set fds; optimized_fd_set_t fds (FD_SETSIZE);
FD_ZERO (&fds); FD_ZERO (fds.get ());
FD_SET (_r, &fds); FD_SET (_r, fds.get ());
struct timeval timeout; struct timeval timeout;
if (timeout_ >= 0) { if (timeout_ >= 0) {
timeout.tv_sec = timeout_ / 1000; timeout.tv_sec = timeout_ / 1000;
timeout.tv_usec = timeout_ % 1000 * 1000; timeout.tv_usec = timeout_ % 1000 * 1000;
} }
#ifdef ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_WINDOWS
int rc = select (0, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); int rc =
select (0, fds.get (), NULL, NULL, timeout_ >= 0 ? &timeout : NULL);
wsa_assert (rc != SOCKET_ERROR); wsa_assert (rc != SOCKET_ERROR);
#else #else
int rc = select (_r + 1, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); int rc =
select (_r + 1, fds.get (), NULL, NULL, timeout_ >= 0 ? &timeout : NULL);
if (unlikely (rc < 0)) { if (unlikely (rc < 0)) {
errno_assert (errno == EINTR); errno_assert (errno == EINTR);
return -1; return -1;
......
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