zip/zip-2.3-tempfile.patch
OBS User autobuild 8954461ee8 Accepting request 25076 from Archiving
Copy from Archiving/zip based on submit request 25076 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/25076
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zip?expand=0&rev=6
2009-11-27 11:59:29 +00:00

24 lines
565 B
Diff

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 */