aboutsummaryrefslogtreecommitdiffstats
path: root/antispam-plugin.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-11-11 12:04:12 +0100
committerJohannes Berg <johannes@sipsolutions.net>2008-11-11 12:04:12 +0100
commitae940d8ab29da4a09d4d0ec5a8fdc87b40382407 (patch)
treefc0cc45cfae42fdc4a49ff690a0d2dc0e7d9c101 /antispam-plugin.h
parentcf194d158db5c09364c15487da9b24844c7622a9 (diff)
downloaddovecot-antispam-ae940d8ab29da4a09d4d0ec5a8fdc87b40382407.tar.gz
dovecot-antispam-ae940d8ab29da4a09d4d0ec5a8fdc87b40382407.tar.xz
dovecot-antispam-ae940d8ab29da4a09d4d0ec5a8fdc87b40382407.zip
fix signature-log backend compilation with dovecot 1.1
Diffstat (limited to 'antispam-plugin.h')
-rw-r--r--antispam-plugin.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/antispam-plugin.h b/antispam-plugin.h
index 6ca975f..468d43e 100644
--- a/antispam-plugin.h
+++ b/antispam-plugin.h
@@ -5,6 +5,7 @@
#include "str.h"
#include "client.h"
#include "ostream.h"
+#include "dict.h"
#include "imap-search.h"
#include "dovecot-version.h"
@@ -111,6 +112,12 @@ o_stream_create_from_fd(int fd, pool_t pool ATTR_UNUSED)
{
return o_stream_create_fd(fd, 0, TRUE);
}
+
+static inline struct dict *
+string_dict_init(const char *uri, const char *username)
+{
+ return dict_init(uri, DICT_DATA_TYPE_STRING, username);
+}
#elif DOVECOT_VERSION_CODE(1, 0) == DOVECOT_VERSION
#define ME(err)
#define PLUGIN_ID
@@ -133,6 +140,12 @@ o_stream_create_from_fd(int fd, pool_t pool)
{
return o_stream_create_file(fd, pool, 0, TRUE);
}
+
+static inline struct dict *
+string_dict_init(const char *uri, const char *username)
+{
+ return dict_init(uri, username);
+}
#else
#error "Building against this dovecot version is not supported"
#endif