#include "smtp.h"
#include <zotnet/mts/mts.h>
#include <signal.h>
+#ifdef MPOP
+#include <errno.h>
+#endif
/*
* This module implements an interface to SendMail very similar
struct smtp sm_reply; /* global... */
-#ifdef MPOP
-extern int errno;
-#endif
-
#define MAXEHLO 20
if ((dp = strrchr(*ap, '/')) && *++dp == NULL)
*--dp = NULL;
snprintf (sm_tmpfil, sizeof(sm_tmpfil), "%s/smtpXXXXXX", *ap);
+#ifdef HAVE_MKSTEMP
+ mkstemp (sm_tmpfil);
+#else
mktemp (sm_tmpfil);
+#endif
if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
sm_ispool = 1;