X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..3da6cc979e0e8e466f760acc113314c57176fea9:/mts/smtp/smtp.c diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index f7756381..90b37a82 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -9,6 +9,9 @@ #include "smtp.h" #include #include +#ifdef MPOP +#include +#endif /* * This module implements an interface to SendMail very similar @@ -71,10 +74,6 @@ static char *sm_moreply = "; "; struct smtp sm_reply; /* global... */ -#ifdef MPOP -extern int errno; -#endif - #define MAXEHLO 20 @@ -248,12 +247,16 @@ rclient (char *server, char *protocol, char *service) if ((dp = strrchr(*ap, '/')) && *++dp == NULL) *--dp = NULL; snprintf (sm_tmpfil, sizeof(sm_tmpfil), "%s/smtpXXXXXX", *ap); +#ifdef HAVE_MKSTEMP + sd = mkstemp (sm_tmpfil); +#else mktemp (sm_tmpfil); if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) { sm_ispool = 1; break; } +#endif } free (cp);