zip/zip-2.3-tempfile.patch

24 lines
565 B
Diff
Raw Normal View History

Index: fileio.c
===================================================================
--- fileio.c.orig 2005-06-16 05:31:52.000000000 +0200
+++ fileio.c 2009-11-24 18:19:52.483933000 +0100
@@ -919,7 +919,18 @@ char *zip; /* path name of
}
#else
strcat(t, "ziXXXXXX"); /* must use lowercase for Linux dos file system */
+#ifdef NO_MKSTEMP
return mktemp(t);
+#else
+ {
+ int fd;
+
+ if ((fd = mkstemp(t)) < 0)
+ return NULL;
+ close(fd);
+ }
+ return t;
+#endif
#endif /* NO_MKTEMP */
#endif /* TANDEM */
#endif /* CMS_MVS */