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)
#include <sys/timeb.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* sysexits */
#ifdef HAVE_SYSEXITS_H
#include <sysexits.h>
#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
#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
#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__)
#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;
/*
#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
#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 */