X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fm_tmpfil.c;h=31bce67a876bac4452da4c9a7d546c4dd833beff;hb=b89abf4ec88b6bb884c427f5cf48005720e94e29;hp=1b4f3549153bc553323d6fc3fb18bdbfe2b39ece;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/m_tmpfil.c b/sbr/m_tmpfil.c index 1b4f354..31bce67 100644 --- a/sbr/m_tmpfil.c +++ b/sbr/m_tmpfil.c @@ -14,7 +14,11 @@ m_tmpfil (char *template) static char tmpfil[BUFSIZ]; snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template); +#ifdef HAVE_MKSTEMP + unlink(mkstemp(tmpfil)); +#else unlink(mktemp(tmpfil)); +#endif return tmpfil; }