Description: implicit pointer conversion for HandleArticle Add a function prototype for HandleArticle() and remove the existing explicit cast to quiet function pointer conversion warning which is fatal to the build. . implicit pointer conversion xalloc/xrealloc Perl is using libinn ensure we are including the appropriate headers to quiet function pointer conversion warning which is fatal to the build. Author: Andy Whitcroft Bug-Ubuntu: http://bugs.launchpad.net/bugs/1528545 Index: inn-1.7.2q/innd/innd.h =================================================================== --- inn-1.7.2q.orig/innd/innd.h +++ inn-1.7.2q/innd/innd.h @@ -598,3 +598,11 @@ extern void TCLreadfilter(); extern void TCLsetup(); extern void TCLclose(); #endif /* defined(DO_TCL) */ + + +/* +** PERL Functions +*/ +#if defined(DO_PERL) +char *HandleArticle(char *artBody); +#endif /* defined(DO_PERL) */ Index: inn-1.7.2q/innd/art.c =================================================================== --- inn-1.7.2q.orig/innd/art.c +++ inn-1.7.2q/innd/art.c @@ -1920,7 +1920,7 @@ ARTpost(cp, Replic, ihave) #if defined(DO_PERL) pathForPerl = HeaderFind(article->Data, "Path", 4) ; TMRstart(TMR_PERL); - if ((perlrc = (char *)HandleArticle(Data.Body)) != NULL) { + if ((perlrc = HandleArticle(Data.Body)) != NULL) { TMRstop(TMR_PERL); (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, perlrc); syslog(L_NOTICE, "rejecting[perl] %s %s", HDR(_message_id), buff); Index: inn-1.7.2q/nnrpd/nnrpd.h =================================================================== --- inn-1.7.2q.orig/nnrpd/nnrpd.h +++ inn-1.7.2q/nnrpd/nnrpd.h @@ -144,3 +144,10 @@ extern void Reply(char *, ...); #if defined(VAR_VARARGS) extern void Reply(); #endif /* defined(VAR_VARARGS) */ + +/* +** PERL Functions +*/ +#if defined(DO_PERL) +char *HandleHeaders(char *artBody); +#endif /* defined(DO_PERL) */ Index: inn-1.7.2q/nnrpd/post.c =================================================================== --- inn-1.7.2q.orig/nnrpd/post.c +++ inn-1.7.2q/nnrpd/post.c @@ -896,7 +896,7 @@ ARTpost(article, idbuff) #if defined(DO_PERL) /* Calls the Perl subroutine for headers management */ - if ((p = (char *)HandleHeaders(article)) != NULL) { + if ((p = HandleHeaders(article)) != NULL) { if (strncmp(p, "DROP", 4) == 0) { syslog(L_NOTICE, "%s post %s", ClientHost, p); return NULL; Index: inn-1.7.2q/innd/innd.h =================================================================== --- inn-1.7.2q.orig/innd/innd.h +++ inn-1.7.2q/innd/innd.h @@ -605,4 +605,5 @@ extern void TCLclose(); */ #if defined(DO_PERL) char *HandleArticle(char *artBody); +char *HandleMessageID(char *messageID); #endif /* defined(DO_PERL) */ Index: inn-1.7.2q/innd/nc.c =================================================================== --- inn-1.7.2q.orig/innd/nc.c +++ inn-1.7.2q/innd/nc.c @@ -1589,7 +1589,7 @@ NCcheck(cp) #if defined(DO_PERL) /* invoke a perl message filter on the message id */ - else if ((perlrc = (char *)HandleMessageID(p)) != NULL) { + else if ((perlrc = HandleMessageID(p)) != NULL) { cp->Refused++; (void)sprintf(cp->Sendid.Data, "%d %s", NNTP_ERR_GOTID_VAL, p); NCwritereply(cp, cp->Sendid.Data); Index: inn-1.7.2q/nnrpd/perl.c =================================================================== --- inn-1.7.2q.orig/nnrpd/perl.c +++ inn-1.7.2q/nnrpd/perl.c @@ -24,6 +24,7 @@ static void use_rcsid (const char *rid) #include "post.h" #include "logging.h" #include "macros.h" +#include "nnrpd.h" #if defined(DO_PERL)