Closed Jc2k closed 5 years ago
This is the patch i'm testing:
diff --git a/xaps-daemon.c b/xaps-daemon.c
index 49efa20..10ceef1 100644
--- a/xaps-daemon.c
+++ b/xaps-daemon.c
@@ -26,7 +26,7 @@
#include <config.h>
#include <lib.h>
#include <net.h>
-#if (DOVECOT_VERSION_MAJOR >= 2u || DOVECOT_VERSION_MINOR >= 3u)
+#if (DOVECOT_VERSION_MAJOR > 2u || (DOVECOT_VERSION_MAJOR == 2 && DOVECOT_VERSION_MINOR >= 31u))
#include <ostream-unix.h>
#include <ostream.h>
#endif
@@ -39,6 +39,7 @@
#include "xaps-daemon.h"
+const char *str_nescape(const void *str, size_t len);
/*
* Send the request to our daemon over a unix domain socket. The
@@ -208,7 +209,7 @@ const char *str_nescape(const void *str, size_t len)
/* quote */
ret = t_str_new((size_t)(p - s) + 128);
- str_append_max(ret, s, (size_t)(p - s));
+ str_append_data(ret, s, (size_t)(p - s));
for (; (size_t)(p - s) < len; p++) {
if (IS_ESCAPED_CHAR(*p))
@@ -216,4 +217,4 @@ const char *str_nescape(const void *str, size_t len)
str_append_data(ret, p, 1);
}
return str_c(ret);
-}
\ No newline at end of file
+}
Thx, I am already looking into this. You are right that the version match is wrong.
Thank you for pointing out the str_append_max problem. I'll look into that one too.
Cheers
According to README, Dovecot > 2.2.19 is still supported on
master
but it doesn't build onstretch
(which has 2.2.27).There are 3 problems AFAICT:
ostream
doesn't seem to be working - if i'm reading it right its saysmajor version >= 2 or minor version >= 3
. Shouldnt it be something likemajor > 2 || (major == 2 && minor > ???)
The compiler on stretch is being strict about ordering -
str_nescape
is being used before we define itstr_append_max
is still calledstr_append_n
on this version of dovecot.With those changes in place the build completes - will report back on if they actually work.
(This is probably related to #41).