[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ZMailer] smtpserver core dumped



Hi all

FreeBSD-7.2 + perl-5.8.9 + zmailer-2.99.57 (--with-embed-perl)

smtpserver compiling produce following:
./smtphook.c: In function 'ZSMTP_hook_init':
./smtphook.c:78: warning: passing argument 2 of 'Perl_sys_init3' from 
incompatible pointer type

When smtpserver started it core dumped.
Looking at smtphook.c and "man perlembed" and yes incompatible type founded.

(dirty) patch by diff -c applyed:

---------------- cut here -------------------
*** smtphook.c.orig     Fri Sep 11 16:53:06 2009
--- smtphook.c  Fri Sep 11 16:58:18 2009
***************
*** 67,72 ****
--- 67,73 ----
   {
         const char *smtpperl5opt;
         char *argv[] = {"", perlhookpath};
+       char **argv2 = &argv;
         int argc = sizeof(argv) / sizeof(char *), exitstatus;

   #ifdef HAVE_PUTENV
***************
*** 75,81 ****
                         type(NULL , 0, NULL, "Can not set PERL5OPT 
environment variable !");
   #endif

!       PERL_SYS_INIT3(&argc, &argv, NULL);

         if ((my_perl = perl_alloc()) == NULL) {
                 type(NULL , 0, NULL, "Can not allocate memory for perl !");
--- 76,82 ----
                         type(NULL , 0, NULL, "Can not set PERL5OPT 
environment variable !");
   #endif

!       PERL_SYS_INIT3(&argc, &argv2, NULL);

         if ((my_perl = perl_alloc()) == NULL) {
                 type(NULL , 0, NULL, "Can not allocate memory for perl !");
---------------- /cut here -------------------

smtpserver compiled and worked correctly now.


--
CU,
Victor Gamov
--
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi