From 43f3cc5c7841f16efaa8fa8a8b5c6504648e7a65 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 5 Nov 2016 18:14:22 +0000 Subject: [PATCH] Problem: kFreeBSD does not implement pthread_setschedparam Solution: do not fail on kFreeBSD if this feature is not available at runtime. Thanks Steven Chamberlain for the patch! --- src/thread.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/thread.cpp b/src/thread.cpp index 2c044a49..f5e1165e 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_ #endif rc = pthread_setschedparam(descriptor, policy, ¶m); + +#ifdef __FreeBSD_kernel__ + // If this feature is unavailable at run-time, don't abort. + if(rc == ENOSYS) return; +#endif + posix_assert (rc); #else