=== modified file 'zlibrary/unix/filesystem/ZLUnixFileOutputStream.cpp'
--- zlibrary/unix/filesystem/ZLUnixFileOutputStream.cpp	2006-08-09 17:00:36 +0000
+++ zlibrary/unix/filesystem/ZLUnixFileOutputStream.cpp	2007-01-08 16:30:21 +0000
@@ -36,9 +36,11 @@
 	char *tmpl = new char[myName.length() + 8];
 	strcpy(tmpl, myName.c_str());
 	strcpy(tmpl + myName.length(), ".XXXXXX");
-	if (mkstemp(tmpl) != -1) {
+
+	int fd = mkstemp(tmpl);
+	if (fd != -1) {
 		myTemporaryName = tmpl;
-		myFile = fopen(myTemporaryName.c_str(), "wb");
+		myFile = fdopen(fd, "wb");
 		myHasErrors = false;
 	}
 

