--- tools/fax2ps.c.orig	Fri Oct 22 16:33:29 1999
+++ tools/fax2ps.c	Fri Oct 22 16:34:10 1999
@@ -382,8 +382,7 @@
 	char temp[1024], buf[16*1024];
 
 	strcpy(temp, "/tmp/fax2psXXXXXX");
-	(void) mktemp(temp);
-	fd = fopen(temp, "w");
+	fd = fdopen(mkstemp(temp), "w+");
 	if (fd == NULL) {
 	    fprintf(stderr, "Could not create temp file \"%s\"\n", temp);
 	    exit(-2);
