From 8cf474069601dbb376de86dffae49988029794ee Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 18 Sep 2014 13:08:37 +0100 Subject: [PATCH] Resatore check for sched_yield. --- CMakeLists.txt | 1 + config.h.in | 5 +++++ 2 files changed, 6 insertions(+) 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 -- 2.39.5