openbsd-ports/archivers/zoo/patches/patch-ac
brad 93d6a8d416 - replace ugliness in install target with BSD_INSTALL macros
- convert patches to unified diffs
- add patch to suppress some warnings
1999-12-16 04:31:40 +00:00

27 lines
862 B
Plaintext

--- zoopack.c.orig Fri Apr 30 23:59:21 1993
+++ zoopack.c Wed Dec 15 23:08:44 1999
@@ -78,6 +78,9 @@
int curr_dir = 0; /* create backup in curr dir */
static char partial_msg[] =
"Partially packed archive left in %s.\n";
+#if defined(__OpenBSD__)
+int tempfd;
+#endif
#ifdef FATTR
unsigned long zoofattr; /* zoo archive protection */
@@ -171,8 +174,11 @@
} else {
strcpy (temp_file, xes);
}
-mktemp (temp_file); /* ... and make unique */
-new_file = zoocreate (temp_file);
+tempfd = mkstemp (temp_file); /* ... and make unique */
+if (tempfd == -1)
+ prterror ('f', "Could not create temporary file %s.\n", temp_file);
+new_file = fdopen(tempfd, "w+");
+/*new_file = zoocreate (temp_file); */
if (new_file == NOFILE)
prterror ('f', "Could not create temporary file %s.\n", temp_file);