mirror of
https://0xacab.org/liberate/trees.git
synced 2024-11-25 03:30:34 +01:00
Support dovecot 2.3
Untested but it builds now properly. Thanks to "smorks" for the report! Fixes #16 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
parent
e54c717bd4
commit
e136c32a04
@ -431,5 +431,9 @@ trees_istream_create(struct istream *input,
|
||||
sstream->out_byte_count = 0;
|
||||
#endif
|
||||
|
||||
#if DOVECOT_PREREQ(2, 3)
|
||||
return i_stream_create(&sstream->istream, input, i_stream_get_fd(input), 0);
|
||||
#else
|
||||
return i_stream_create(&sstream->istream, input, i_stream_get_fd(input));
|
||||
#endif /* DOVECOT_PREREQ */
|
||||
}
|
||||
|
@ -174,7 +174,14 @@ trees_ostream_sendv(struct ostream_private *stream,
|
||||
static int
|
||||
trees_ostream_flush(struct ostream_private *stream)
|
||||
{
|
||||
/* This is pretty ugly but unfortunately between 2.2 and 2.3, Dovecot changed
|
||||
* the expected value to be non zero in 2.3+ . */
|
||||
#if DOVECOT_PREREQ(2, 3)
|
||||
ssize_t result = 1;
|
||||
#else
|
||||
ssize_t result = 0;
|
||||
#endif /* DOVECOT_PREREQ */
|
||||
|
||||
struct trees_ostream *sstream = (struct trees_ostream *) stream;
|
||||
|
||||
if (sstream->flushed) {
|
||||
|
Loading…
Reference in New Issue
Block a user