@@ -729,6 +729,7 @@ CHECK_INCLUDE_FILES(linux/falloc.h HAVE_LINUX_FALLOC_H) | |||
CHECK_INCLUDE_FILES(sys/eventfd.h HAVE_SYS_EVENTFD_H) | |||
CHECK_INCLUDE_FILES(aio.h HAVE_AIO_H) | |||
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) | |||
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H) | |||
# Some dependencies | |||
IF(HAVE_SYS_WAIT_H) |
@@ -328,6 +328,10 @@ | |||
#include <sys/timeb.h> | |||
#endif | |||
#ifdef HAVE_UNISTD_H | |||
#include <unistd.h> | |||
#endif | |||
/* sysexits */ | |||
#ifdef HAVE_SYSEXITS_H | |||
#include <sysexits.h> | |||
@@ -416,45 +420,10 @@ | |||
#include <search.h> | |||
#endif | |||
#ifdef HAVE_LOCALE_H | |||
#include <locale.h> | |||
#define HAVE_SETLOCALE 1 | |||
#endif | |||
#ifdef HAVE_SYS_EVENTFD_H | |||
#include <sys/eventfd.h> | |||
#endif | |||
#ifdef HAVE_AIO_H | |||
#include <aio.h> | |||
#endif | |||
#ifdef HAVE_SYS_SENDFILE_H | |||
#include <sys/sendfile.h> | |||
#endif | |||
#ifdef WITH_GPERF_TOOLS | |||
#include <google/profiler.h> | |||
#endif | |||
#ifdef HAVE_FETCH_H | |||
#include <fetch.h> | |||
#elif defined(CURL_FOUND) | |||
#include <curl/curl.h> | |||
#endif | |||
#ifdef HAVE_READPASSPHRASE_H | |||
#include <readpassphrase.h> | |||
#endif | |||
#ifdef HAVE_TERMIOS_H | |||
#include <termios.h> | |||
#endif | |||
#ifdef HAVE_PATHS_H | |||
#include <paths.h> | |||
#endif | |||
#include <errno.h> | |||
#include <signal.h> | |||
#ifdef HAVE_SIGINFO_H |
@@ -25,6 +25,14 @@ | |||
#include "aio_event.h" | |||
#include "main.h" | |||
#ifdef HAVE_SYS_EVENTFD_H | |||
#include <sys/eventfd.h> | |||
#endif | |||
#ifdef HAVE_AIO_H | |||
#include <aio.h> | |||
#endif | |||
/* Linux syscall numbers */ | |||
#if defined(__i386__) | |||
# define SYS_io_setup 245 |
@@ -25,6 +25,9 @@ | |||
#include "config.h" | |||
#include "buffer.h" | |||
#include "main.h" | |||
#ifdef HAVE_SYS_SENDFILE_H | |||
#include <sys/sendfile.h> | |||
#endif | |||
#define G_DISPATCHER_ERROR dispatcher_error_quark() | |||
#define debug_ip(...) rspamd_conditional_debug(rspamd_main->logger, d->peer_addr, __FUNCTION__, __VA_ARGS__) |
@@ -25,6 +25,12 @@ | |||
#include "util.h" | |||
#include "http.h" | |||
#ifdef HAVE_FETCH_H | |||
#include <fetch.h> | |||
#elif defined(CURL_FOUND) | |||
#include <curl/curl.h> | |||
#endif | |||
struct rspamd_client_request; | |||
/* |
@@ -42,6 +42,10 @@ | |||
#include <openssl/rsa.h> | |||
#include <openssl/pem.h> | |||
#endif | |||
#ifdef HAVE_LOCALE_H | |||
#include <locale.h> | |||
#define HAVE_SETLOCALE 1 | |||
#endif | |||
/* 2 seconds to fork new process in place of dead one */ | |||
#define SOFT_FORK_TIME 2 |
@@ -36,6 +36,13 @@ | |||
#include <openssl/err.h> | |||
#endif | |||
#ifdef HAVE_TERMIOS_H | |||
#include <termios.h> | |||
#endif | |||
#ifdef HAVE_READPASSPHRASE_H | |||
#include <readpassphrase.h> | |||
#endif | |||
/* Check log messages intensity once per minute */ | |||
#define CHECK_TIME 60 | |||
/* More than 2 log messages per second */ |