use mkstemp on systems that have it
[mmh] / mts / smtp / smtp.c
index e2f6574..773696b 100644 (file)
@@ -247,7 +247,11 @@ 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
+               mkstemp (sm_tmpfil);
+#else
                mktemp (sm_tmpfil);
+#endif
 
                if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
                    sm_ispool = 1;