diff --git a/Changelog b/Changelog index e1fede1..a92fd1f 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,9 @@ [Changes 1.2.2] +* Cast check_ext_mail and check_ext_mail_status function pointers to the + correct type before using them. This might have caused a problem with + the qmail plugin on 64 bit architectures. (caf) + * Fix bug in DCC privileged port detection logic. (caf) * Don't show DCC "Handshake failed" message twice, improve the message itself diff --git a/source/mail.c b/source/mail.c index 0634961..b4b2455 100644 --- a/source/mail.c +++ b/source/mail.c @@ -87,8 +87,8 @@ int count_maildir_mail(void) #ifdef WANT_DLL -#define check_ext_mail global_table[CHECK_EXT_MAIL] -#define check_ext_mail_status global_table[CHECK_EXT_MAIL_STATUS] +#define check_ext_mail ((char *(*)(void))global_table[CHECK_EXT_MAIL]) +#define check_ext_mail_status ((int (*)(void))global_table[CHECK_EXT_MAIL_STATUS]) #endif /* @@ -111,7 +111,7 @@ static time_t old_stat = 0; struct stat stat_buf; #endif #ifdef WANT_DLL - if (check_ext_mail) + if (check_ext_mail_status) return (*check_ext_mail_status)(); #endif if (!get_int_var(MAIL_VAR)) @@ -182,7 +182,7 @@ static char ret_str[12]; static int i = 0; #ifdef WANT_DLL if (check_ext_mail) - return (char *)(*check_ext_mail)(); + return (*check_ext_mail)(); #endif switch (get_int_var(MAIL_VAR)) {