X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fspost.c;h=1f3b014b8fb74a79c02c3af17677e40362eae931;hb=7736b0a60c15cc20db0ba8c3e0fe8e11d1c78c20;hp=5bc41d8a25cde8b2e5375255b8b1040f42e11007;hpb=794dab6aa5027ffaf024506140c258f6a0a9322d;p=mmh diff --git a/uip/spost.c b/uip/spost.c index 5bc41d8..1f3b014 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -14,6 +14,7 @@ #include #include #include +#include #define uptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c) @@ -347,13 +348,14 @@ main (int argc, char **argv) } else { #ifdef HAVE_MKSTEMP - mkstemp (tmpfil); + if ((out = fdopen( mkstemp (tmpfil), "w" )) == NULL ) + adios (tmpfil, "unable to create"); #else mktemp (tmpfil); -#endif if ((out = fopen (tmpfil, "w")) == NULL) adios (tmpfil, "unable to create"); chmod (tmpfil, 0600); +#endif } hdrtab = (msgstate == normal) ? NHeaders : RHeaders;