Commit d9ff3489 authored by Constantin Rack's avatar Constantin Rack Committed by GitHub

Merge pull request #2196 from bluca/kfreebsd

Problem: some errors on Debian + kFreeBSD
parents 6585aeab 43f3cc5c
......@@ -156,6 +156,12 @@ zmq::stream_engine_t::~stream_engine_t ()
wsa_assert (rc != SOCKET_ERROR);
#else
int rc = close (s);
#ifdef __FreeBSD_kernel__
// FreeBSD may return ECONNRESET on close() under load but this is not
// an error.
if (rc == -1 && errno == ECONNRESET)
rc = 0;
#endif
errno_assert (rc == 0);
#endif
s = retired_fd;
......
......@@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_
#endif
rc = pthread_setschedparam(descriptor, policy, &param);
#ifdef __FreeBSD_kernel__
// If this feature is unavailable at run-time, don't abort.
if(rc == ENOSYS) return;
#endif
posix_assert (rc);
#else
......
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