$OpenBSD: patch-tools_fax2ps_c,v 1.1 2001/10/10 15:15:00 wilfried Exp $
--- tools/fax2ps.c.orig	Wed Mar 29 06:22:33 2000
+++ tools/fax2ps.c	Wed Oct 10 17:07:22 2001
@@ -382,8 +382,7 @@ main(int argc, char** argv)
 	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);
