--- kparts/part.cpp.orig	Fri Sep 29 14:20:12 2000
+++ kparts/part.cpp	Fri Sep 29 14:28:28 2000
@@ -447,7 +447,15 @@ bool ReadWritePart::saveAs( const KURL &
     // We haven't saved yet, or we did but locally - provide a temp file
     if ( m_file.isEmpty() || !m_bTemp )
     {
+#ifdef HAVE_MKSTEMP
+      char mfile[50];
+
+      strcpy(mfile, "/tmp/Save.XXXXXXXXXX");
+      close(open(mkstemp(mfile));
+      m_file = mfile;
+#else
       m_file = tmpnam(0);
+#endif
       m_bTemp = true;
     }
     // otherwise, we already had a temp file
