--- tools/fax2ps.c.orig	Wed Jun  9 14:54:37 1999
+++ tools/fax2ps.c	Wed Jun  9 14:55:27 1999
@@ -378,8 +378,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);
