X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fm_tmpfil.c;h=31bce67a876bac4452da4c9a7d546c4dd833beff;hp=1b4f3549153bc553323d6fc3fb18bdbfe2b39ece;hb=0ccd1945560c715e4cc4063209bd0d68b75d5470;hpb=fd96433a81a97a1e2d8667c7087693e94706807d 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; }