1 --- dovecot-antispam-2.0/antispam-plugin.h~ 2011-11-07 10:49:47.000000000 +0100
2 +++ dovecot-antispam-2.0/antispam-plugin.h 2012-05-09 11:50:32.432166565 +0200
5 return dict_init(uri, DICT_DATA_TYPE_STRING, username, NULL);
7 +#elif DOVECOT_IS_EQ(2, 1)
8 +#define mempool_unref pool_unref
9 +#define module_arg struct module *
10 +#define ME(err) MAIL_ERROR_ ##err,
12 +static inline const char *const *
13 +get_mail_headers(struct mail *mail, const char *hdr)
15 + const char *const *ret;
16 + if (mail_get_headers(mail, hdr, &ret))
21 +static inline struct ostream *
22 +o_stream_create_from_fd(int fd, pool_t pool ATTR_UNUSED)
24 + return o_stream_create_fd(fd, 0, TRUE);
27 +static inline struct dict *
28 +string_dict_init(const char *uri, const char *username)
30 + return dict_init(uri, DICT_DATA_TYPE_STRING, username, NULL);
33 #error "Building against this dovecot version is not supported"