Ticket #24474: dovecot-antispam-mac.diff

File dovecot-antispam-mac.diff, 1.8 KB (added by aseering@…, 14 years ago)

Patch against dovecot-antispam git HEAD to make it compile properly on MacOS X 10.4/ppc

  • Makefile

    diff --git a/Makefile b/Makefile
    index b833a3f..239f4f2 100644
    a b INSTALLDIR ?= $(moduledir)/imap 
    77# Kill CFLAGS from dovecot-config
    88CFLAGS := $(CFLAGSORIG)
    99
     10MACOSX_DEPLOYMENT_TARGET := 10.3
     11
    1012# includes/flags we need for building a dovecot plugin
    1113INCS += -DHAVE_CONFIG_H
    1214INCS += -I$(DOVECOT)/
    objs += signature.o 
    5658endif
    5759
    5860# main make rules
    59 CFLAGS += -fPIC -shared -Wall -Wextra -DPLUGINNAME=$(PLUGINNAME)
     61CFLAGS += -fPIC -dynamiclib -fno-common -undefined dynamic_lookup -Wall -Wextra -DPLUGINNAME=$(PLUGINNAME)
    6062CC ?= cc
    6163HOSTCC ?= cc
    6264
  • antispam-plugin.c

    diff --git a/antispam-plugin.c b/antispam-plugin.c
    index 455668d..45443bf 100644
    a b extern void (*hook_mail_storage_created)(struct mail_storage *storage); 
    4141/* internal stuff we need */
    4242#include "antispam-plugin.h"
    4343
     44void (*antispam_next_hook_mail_storage_created)(struct mail_storage *storage);
     45
    4446/* macro since only needed for dovecot 1.1 */
    4547PLUGIN_ID;
    4648
  • antispam-plugin.h

    diff --git a/antispam-plugin.h b/antispam-plugin.h
    index fd8783a..f38f9d5 100644
    a b static inline void debug_verbose(const char *fmt __attribute__((unused)), ...) 
    7070#endif
    7171
    7272void antispam_mail_storage_created(struct mail_storage *storage);
    73 void (*antispam_next_hook_mail_storage_created)(struct mail_storage *storage);
     73extern void (*antispam_next_hook_mail_storage_created)(struct mail_storage *storage);
    7474bool mailbox_is_spam(struct mailbox *box);
    7575bool mailbox_is_trash(struct mailbox *box);
    7676bool mailbox_is_unsure(struct mailbox *box);
    7777const char *get_setting(const char *name);
    78 bool antispam_can_append_to_spam;
     78extern bool antispam_can_append_to_spam;
    7979bool keyword_is_spam(const char *keyword);
    8080
    8181extern bool need_keyword_hook;