--- jhead.c.orig 2009-06-23 17:25:41.545847706 +0300 +++ jhead.c 2009-06-23 17:27:36.621854286 +0300 @@ -351,7 +351,7 @@ while(a > 0 && FileName[a-1] != SLASH) a--; memcpy(TempName, FileName, a); strcpy(TempName+a, "XXXXXX"); - mktemp(TempName); + mkstemp(TempName); if(!TempName[0]) { ErrFatal("Cannot find available temporary file name"); }