From 630f6d6ae7dd5d45c6817c9b318059bdec290210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Ba=CC=88rwald?= Date: Thu, 2 Nov 2017 09:59:47 +0100 Subject: [PATCH] Problem: On OSX usleep() changes the errno value Solution: Update errno value after calling usleep() --- src/socket_poller.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/socket_poller.cpp b/src/socket_poller.cpp index a460b548..3bda68e2 100644 --- a/src/socket_poller.cpp +++ b/src/socket_poller.cpp @@ -553,6 +553,10 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_, #elif defined ZMQ_HAVE_ANDROID usleep (timeout_ * 1000); return -1; +#elif defined ZMQ_HAVE_OSX + usleep (timeout_ * 1000); + errno = EAGAIN; + return -1; #else usleep (timeout_ * 1000); return -1;