diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-09 10:45:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-09 10:47:19 +0100 |
commit | e0cd571a328c9d218240e8fc40a49f8efffcbc33 (patch) | |
tree | e958d9ebe39c12618179dca440562161200d74bb | |
parent | 99071239e4c40770dfcfa9cc1264e83e2469fe6c (diff) | |
download | rspamd-e0cd571a328c9d218240e8fc40a49f8efffcbc33.tar.gz rspamd-e0cd571a328c9d218240e8fc40a49f8efffcbc33.zip |
[Fix] Fix build where ucontext is defined in ucontext.h
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | config.h.in | 1 | ||||
-rw-r--r-- | src/libserver/worker_util.c | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c9d99df7f..049d77d30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -906,6 +906,7 @@ CHECK_INCLUDE_FILES(cpuid.h HAVE_CPUID_H) CHECK_INCLUDE_FILES(dirent.h HAVE_DIRENT_H) CHECK_INCLUDE_FILES(stropts.h HAVE_STROPS_H) CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H) +CHECK_INCLUDE_FILES(ucontext.h HAVE_UCONTEXT_H) # Check platform API CHECK_FUNCTION_EXISTS(setproctitle HAVE_SETPROCTITLE) diff --git a/config.h.in b/config.h.in index 5b22d3df9..d6a6a2cbe 100644 --- a/config.h.in +++ b/config.h.in @@ -119,6 +119,7 @@ #cmakedefine HAVE_TANHL 1 #cmakedefine HAVE_TERMIOS_H 1 #cmakedefine HAVE_TIME_H 1 +#cmakedefine HAVE_UCONTEXT_H 1 #cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_VFORK 1 #cmakedefine HAVE_WAIT4 1 diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 68ea9730e..7380a1ffd 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -50,6 +50,10 @@ #define UNWIND_BACKTRACE_DEPTH 256 #endif +#ifdef HAVE_UCONTEXT_H +#include <ucontext.h> +#endif + static void rspamd_worker_ignore_signal (int signo); /** * Return worker's control structure by its type |