MD 2.79 - very minor patch for mimedefang.multiplexor.c

"Kevin A. McGrail" <[email protected]>
Newsgroups gmane.mail.mimedefang
Message-ID <[email protected]>
I'm sure it's an ancient gcc that I'm using but throwing an error 
compiling 2.79.  This is the only issue that stops compilation so I 
fixed it to define the var before setting a value.

gcc -g -O2 -Wall -Wstrict-prototypes -D_POSIX_PTHREAD_SEMANTICS 
-DEMBED_PERL -DSAFE_EMBED_PERL -DPERL_PATH=\"/usr/local/bin/perl\" 
-DMIMEDEFANG_PL=\"/usr/local/bin/mimedefang.pl\" -DRM=\"/bin/rm\" 
-DVERSION=\"2.79\" -DSPOOLDIR=\"/var/spool/MIMEDefang\" 
-DQDIR=\"/var/spool/MD-Quarantine\" -DCONFDIR=\"/etc/mail\"  -c -o 
mimedefang-multiplexor.o ./mimedefang-multiplexor.c
./mimedefang-multiplexor.c: In function `doSlaveReport':
./mimedefang-multiplexor.c:3548: parse error before `now'
./mimedefang-multiplexor.c:3581: `now' undeclared (first use in this 
function)
./mimedefang-multiplexor.c:3581: (Each undeclared identifier is reported 
only once
./mimedefang-multiplexor.c:3581: for each function it appears in.)
./mimedefang-multiplexor.c:3542: warning: `secs' might be used 
uninitialized in this function
make: *** [mimedefang-multiplexor.o] Error 1

--- mimedefang-multiplexor.org  Sun Feb  5 15:02:43 2017
+++ mimedefang-multiplexor.c    Sun Feb  5 15:03:05 2017
@@ -3538,6 +3538,7 @@
      char *ptr = ans;
      char status = '?';
      int i, j;
+    time_t now;

      int secs;
      if (!ans) {
@@ -3545,7 +3546,7 @@
         return;
      }
      *ans = 0;
-    time_t now = time(NULL);
+    now = time(NULL);

      for (i=0; i<Settings.maxSlaves; i++) {
         Slave *s = &AllSlaves[i];


Regards,
KAM
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.