CHECK_SYMBOL_EXISTS(_SC_NPROCESSORS_ONLN unistd.h HAVE_SC_NPROCESSORS_ONLN)
CHECK_SYMBOL_EXISTS(setbit sys/param.h PARAM_H_HAS_BITSET)
CHECK_SYMBOL_EXISTS(getaddrinfo "sys/types.h;sys/socket.h;netdb.h" HAVE_GETADDRINFO)
+CHECK_SYMBOL_EXISTS(sched_yield "sched.h" HAVE_SCHED_YIELD)
IF(NOT HAVE_GETADDRINFO)
MESSAGE(FATAL_ERROR "Your system does not support getaddrinfo call, please consider upgrading it to run rspamd")
#cmakedefine HAVE_IPV6_V6ONLY 1
#cmakedefine HAVE_CTYPE_H 1
+#cmakedefine HAVE_SCHED_YEILD 1
/* Configure allocator */
#define uthash_malloc(sz) g_slice_alloc(sz)
#include <google/profiler.h>
#endif
+#ifdef HAVE_SCHED_YIELD
+#include <sched.h>
+#endif
+
#include <errno.h>
#include <signal.h>
#ifdef HAVE_SIGINFO_H