summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-09-13 14:13:30 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-09-13 14:13:30 +0100
commitac2ee05594e41cdfe1e1d4efdeade3a028376e1e (patch)
tree8904ccae11ec7c46d851731e722d39a232ef48a4 /src/libutil
parent1adcfb1e23467b797c55a01a1da5766fdb0876e0 (diff)
downloadrspamd-ac2ee05594e41cdfe1e1d4efdeade3a028376e1e.tar.gz
rspamd-ac2ee05594e41cdfe1e1d4efdeade3a028376e1e.zip
[Fix] Do not pollute public headers with libev internals
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/upstream.c7
-rw-r--r--src/libutil/upstream.h19
-rw-r--r--src/libutil/util.c1
-rw-r--r--src/libutil/util.h17
4 files changed, 40 insertions, 4 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index a62bf293d..f536a2c6d 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -1,11 +1,11 @@
-/*-
- * Copyright 2016 Vsevolod Stakhov
+/*
+ * Copyright 2023 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,6 +21,7 @@
#include "rdns.h"
#include "cryptobox.h"
#include "utlist.h"
+#include "contrib/libev/ev.h"
#include "logger.h"
#include "contrib/librdns/rdns.h"
#include "contrib/mumhash/mum.h"
diff --git a/src/libutil/upstream.h b/src/libutil/upstream.h
index 08796a1f9..22a020c9c 100644
--- a/src/libutil/upstream.h
+++ b/src/libutil/upstream.h
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2023 Vsevolod Stakhov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef UPSTREAM_H
#define UPSTREAM_H
@@ -10,6 +26,9 @@
extern "C" {
#endif
+/* Forward declaration */
+struct ev_loop;
+
enum rspamd_upstream_rotation {
RSPAMD_UPSTREAM_RANDOM = 0,
RSPAMD_UPSTREAM_HASHED,
diff --git a/src/libutil/util.c b/src/libutil/util.c
index d3c4721bd..f7e22e1bd 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -19,6 +19,7 @@
#include "ottery.h"
#include "cryptobox.h"
+#include "contrib/libev/ev.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
diff --git a/src/libutil/util.h b/src/libutil/util.h
index 662f4e819..4842b890e 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2023 Vsevolod Stakhov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef RSPAMD_UTIL_H
#define RSPAMD_UTIL_H
@@ -12,7 +28,6 @@
#include <netdb.h>
#endif
-#include "contrib/libev/ev.h"
#include <time.h>
#ifdef __cplusplus