From: Vsevolod Stakhov Date: Thu, 18 Sep 2014 12:08:37 +0000 (+0100) Subject: Resatore check for sched_yield. X-Git-Tag: 0.7.1~38 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8cf474069601dbb376de86dffae49988029794ee;p=rspamd.git Resatore check for sched_yield. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f4eaa825..efd760cd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/config.h.in b/config.h.in index fa69767ac..ba57103f8 100644 --- a/config.h.in +++ b/config.h.in @@ -210,6 +210,7 @@ #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) @@ -420,6 +421,10 @@ #include #endif +#ifdef HAVE_SCHED_YIELD +#include +#endif + #include #include #ifdef HAVE_SIGINFO_H