21 lines
561 B
Plaintext
21 lines
561 B
Plaintext
$OpenBSD: patch-fileio_c,v 1.1 2004/02/06 08:29:24 kevlo Exp $
|
|
--- fileio.c.orig 2004-02-06 16:11:15.000000000 +0000
|
|
+++ fileio.c 2004-02-06 16:21:58.000000000 +0000
|
|
@@ -859,7 +859,15 @@ char *zip; /* path name of
|
|
}
|
|
#else
|
|
strcat(t, "ziXXXXXX"); /* must use lowercase for Linux dos file system */
|
|
- return mktemp(t);
|
|
+ {
|
|
+ int fd = mkstemp(t);
|
|
+ if ( fd == -1 ) {
|
|
+ perror( "can't create temp file" );
|
|
+ exit(1);
|
|
+ }
|
|
+ close(fd);
|
|
+ return t;
|
|
+ }
|
|
#endif /* NO_MKTEMP */
|
|
#endif /* TANDEM */
|
|
#endif /* CMS_MVS */
|