Added include of signals.h for SIGNAL() prototype.
[mmh] / mts / sendmail / sendmail.c
index 7556503..546097c 100644 (file)
@@ -9,6 +9,10 @@
 #include <mts/smtp/smtp.h>
 #include <zotnet/mts/mts.h>
 #include <signal.h>
+#include "h/signals.h"  /* for SIGNAL() */
+#ifdef MPOP
+#include <errno.h>
+#endif
 
 /*
  * This module implements an interface to SendMail very similar
@@ -74,10 +78,6 @@ static char *sm_moreply = "; ";
 
 struct smtp sm_reply;          /* global... */
 
-#ifdef MPOP
-extern int errno;
-#endif
-
 static int doingEHLO;
 
 #define        MAXEHLO 20
@@ -113,11 +113,12 @@ sm_init (char *client, char *server, int watch, int verbose,
     if (sm_rfp != NULL && sm_wfp != NULL)
        return RP_OK;
 
-    if (client == NULL || *client == '\0')
+    if (client == NULL || *client == '\0') {
        if (clientname)
            client = clientname;
        else
            client = LocalName();       /* no clientname -> LocalName */
+    }
 
 #ifdef ZMAILER
     if (client == NULL || *client == '\0')