$OpenBSD: patch-mgdiff_c,v 1.1 2001/03/13 16:10:50 brad Exp $ --- mgdiff.c.orig Wed Sep 28 21:56:53 1994 +++ mgdiff.c Tue Mar 13 10:54:30 2001 @@ -1110,7 +1110,9 @@ int main (int argc, char *argv[]) */ case 3: if (strcmp (argv[1], "-") == 0) { - tempfname = tempnam (NULL, "mgdif"); + char xxx[20]; + sprintf(tempfname, "mgdif.XXXXXXXX"); + close(mkstemp (tempfname)); str_fnamel = strdup (tempfname); str_snamel = strdup (user_filename); if (!copy_to_file (stdin, tempfname)) { @@ -1131,7 +1133,9 @@ int main (int argc, char *argv[]) } if (strcmp (argv[2], "-") == 0) { - tempfname = tempnam (NULL, "mgdif"); + char xxx[20]; + sprintf(tempfname, "mgdif.XXXXXXXX"); + close(mkstemp (tempfname)); str_fnamer = strdup (tempfname); str_snamer = strdup (user_filename); if (!copy_to_file (stdin, tempfname)) {