--- 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);
 
