mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
ITS#1482 patch from Michael.Gerdts@usa.alcatel.co
MSVC cannot build clients/ud because the symbol mkstemp is not found. Add tmpfile() support.
This commit is contained in:
parent
52379166ef
commit
ac2cd34aaf
1 changed files with 9 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue