]> source.dussan.org Git - rspamd.git/commitdiff
Resatore check for sched_yield.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Sep 2014 12:08:37 +0000 (13:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Sep 2014 12:08:37 +0000 (13:08 +0100)
CMakeLists.txt
config.h.in

index 1f4eaa8255447587b02ea7544cd14bd3c330b48c..efd760cd81a1ae7f58ce2964b7b09b90409e3732 100644 (file)
@@ -747,6 +747,7 @@ CHECK_SYMBOL_EXISTS(fdatasync unistd.h HAVE_FDATASYNC)
 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")
index fa69767ac56644b87b46fdb1a69c10261f25f104..ba57103f851bf3cebdb1aea89ced454e7e87cf9b 100644 (file)
 #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