X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/794dab6aa5027ffaf024506140c258f6a0a9322d..b84e9d0b0e3e007c103c5a903f44e8e4e37e6714:/uip/spost.c?ds=inline diff --git a/uip/spost.c b/uip/spost.c index 5bc41d8a..1f3b014b 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;