openbsd-ports/misc/xtar/patches/patch-ad
2000-04-16 00:59:08 +00:00

17 lines
398 B
Plaintext

--- common/tmpfile.c.orig Tue May 9 04:06:46 1995
+++ common/tmpfile.c Thu Oct 21 20:43:13 1999
@@ -90,7 +90,12 @@
char *tmpfile_create()
{
TMP_FILE *ptr, *tf;
- char *filename = strdup(tmpnam(NULL));
+ char xxx[40];
+ char *filename;
+
+ sprintf(xxx, "/tmp/tmpf.XXXXXXXX");
+ close(mkstemp(xxx));
+ filename = strdup(xxx);
if(filename == NULL)
return(NULL);