]> git.sur5r.net Git - openldap/commitdiff
Fix NT build problem
authorKurt Zeilenga <kurt@openldap.org>
Thu, 6 Dec 2001 22:02:59 +0000 (22:02 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 6 Dec 2001 22:02:59 +0000 (22:02 +0000)
clients/ud/edit.c

index 88c777c17b5405fd83616f1db0da364f090cb4ac..fa97178f603feffd44caded2cdb1d1943f8c7cb4 100644 (file)
@@ -142,6 +142,7 @@ load_editor( void )
                printf("->load_editor()\n");
 #endif
 
+#ifdef HAVE_MKSTEMP
        sprintf(entry_temp_file, "/tmp/udXXXXXX");
 
        tmpfd = mkstemp(entry_temp_file);
@@ -156,6 +157,14 @@ load_editor( void )
                return(-1);
        }
 
+#else
+       fp = tmpfile();
+       if ( fp == NULL ) {
+               perror("tmpfile");
+               return(-1);
+       }
+#endif
+
        fprintf(fp, "## Directory entry of %s\n", Entry.name);
        fprintf(fp, "##\n");
        fprintf(fp, "## Syntax is:\n");