Package: libmilter-dev Version: 8.14.3-5 Severity: normal I am using the following patch to make my milters build without error. I have extensively tested it on CentOS 5, even though I have tested it less on Debian I am confident in it's quality (the purpose of the code is clear).
I have made no attempt to fix all relevant functions, I merely worked on the functions that I use (and which I can test). diff -ru sendmail-8.13.8.bak/include/libmilter/mfapi.h sendmail-8.13.8/include/libmilter/mfapi.h --- sendmail-8.13.8.bak/include/libmilter/mfapi.h 2006-05-05 03:02:01.000000000 +1000 +++ sendmail-8.13.8/include/libmilter/mfapi.h 2008-10-12 13:21:09.000000000 +1100 @@ -94,7 +94,7 @@ struct smfiDesc { - char *xxfi_name; /* filter name */ + const char *xxfi_name; /* filter name */ int xxfi_version; /* version code -- do not change */ unsigned long xxfi_flags; /* flags */ @@ -334,7 +334,7 @@ */ /* Return the value of a symbol. */ -LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, char *)); +LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, const char *)); /* ** Return the value of a symbol. @@ -348,7 +348,7 @@ ** the MTA for use in SMTP replies may call smfi_setreply before returning. */ -LIBMILTER_API int smfi_setreply __P((SMFICTX *, char *, char *, char *)); +LIBMILTER_API int smfi_setreply __P((SMFICTX *, const char *, const char *, const char *)); /* ** Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply @@ -388,7 +388,7 @@ ** char *headerv; Header field value */ -LIBMILTER_API int smfi_chgheader __P((SMFICTX *, char *, int, char *)); +LIBMILTER_API int smfi_chgheader __P((SMFICTX *, const char *, int, const char *)); /* ** Change/delete a header in the message. It is not checked for standards diff -ru sendmail-8.13.8.bak/libmilter/smfi.c sendmail-8.13.8/libmilter/smfi.c --- sendmail-8.13.8.bak/libmilter/smfi.c 2005-03-30 10:44:07.000000000 +1000 +++ sendmail-8.13.8/libmilter/smfi.c 2008-10-12 13:21:57.000000000 +1100 @@ -13,7 +13,7 @@ #include <sm/varargs.h> #include "libmilter.h" -static int smfi_header __P((SMFICTX *, int, int, char *, char *)); +static int smfi_header __P((SMFICTX *, int, int, const char *, const char *)); static int myisenhsc __P((const char *, int)); /* for smfi_set{ml}reply, let's be generous. 256/16 should be sufficient */ @@ -40,8 +40,8 @@ SMFICTX *ctx; int cmd; int hdridx; - char *headerf; - char *headerv; + const char *headerf; + const char *headerv; { size_t len, l1, l2, offset; int r; @@ -141,9 +141,9 @@ int smfi_chgheader(ctx, headerf, hdridx, headerv) SMFICTX *ctx; - char *headerf; + const char *headerf; mi_int32 hdridx; - char *headerv; + const char *headerv; { if (!mi_sendok(ctx, SMFIF_CHGHDRS) || hdridx < 0) return MI_FAILURE; @@ -349,9 +349,9 @@ int smfi_setreply(ctx, rcode, xcode, message) SMFICTX *ctx; - char *rcode; - char *xcode; - char *message; + const char *rcode; + const char *xcode; + const char *message; { size_t len; char *buf; @@ -573,7 +573,7 @@ char * smfi_getsymval(ctx, symname) SMFICTX *ctx; - char *symname; + const char *symname; { int i; char **s; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]