Sven Hartge <s...@svenhartge.de> wrote: > Nope, does not compile (dovecot-dev headers are installed):
OK, trying to fix this, without having any deeper knowlege of C (anymore): > deleted-to-trash-plugin.c: In function ‘mailbox_open_or_create’: > deleted-to-trash-plugin.c:79: error: ‘MAILBOX_FLAG_KEEP_RECENT’ undeclared > (first use in this function) MAILBOX_FLAG_KEEP_RECENT is not present in 2.1, seems to me it was made the default and MAILBOX_FLAG_DROP_RECENT was introduced as its counterpart. I removed the flag from the call to mailbox_alloc() in 72 static struct mailbox * 73 mailbox_open_or_create(struct mailbox_list *list, const char *name, 74 const char **error_r) 75 { 76 struct mailbox *box; 77 enum mail_error error; 78 79 box = mailbox_alloc(list, name, MAILBOX_FLAG_NO_INDEX_FILES); 80 if (mailbox_open(box) == 0) { 81 *error_r = NULL; 82 return box; 83 } 84 and retried to compile: cc \ -fPIC -shared -Wall \ -I/usr/include/dovecot \ -I/usr/include/dovecot/src \ -I/usr/include/dovecot/src/lib \ -I/usr/include/dovecot/src/lib-storage \ -I/usr/include/dovecot/src/lib-mail \ -I/usr/include/dovecot/src/lib-imap \ -I/usr/include/dovecot/src/lib-index \ -DHAVE_CONFIG_H \ deleted-to-trash-plugin.c -o lib_deleted_to_trash_plugin.so deleted-to-trash-plugin.c: In function ‘copy_deleted_mail_to_trash’: deleted-to-trash-plugin.c:135: warning: passing argument 1 of ‘mailbox_keywords_unref’ from incompatible pointer type /usr/include/dovecot/mail-storage.h:612: note: expected ‘struct mail_keywords **’ but argument is of type ‘struct mailbox *’ deleted-to-trash-plugin.c:135: error: too many arguments to function ‘mailbox_keywords_unref’ make: *** [lib_deleted_to_trash_plugin.so] Error 1 _and_ now I am at the end of my wisdom. Pointer magic in C has always been a dark dark mystery to me (I learned programming in Pascal, Ada95 and later Perl ...). Help, anybody? Grüße, Sven. -- Sigmentation fault. Core dumped.