aboutsummaryrefslogtreecommitdiffstats
path: root/mkstemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkstemp.c')
-rw-r--r--mkstemp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mkstemp.c b/mkstemp.c
index 7bb4ea32b7..3245cff177 100644
--- a/mkstemp.c
+++ b/mkstemp.c
@@ -16,12 +16,22 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
+
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifndef __set_errno
#define __set_errno(x) errno=(x)
@@ -64,6 +74,7 @@ mkstemp (template)
}
/* We return the null string if we can't find a unique file name. */
+
template[0] = '\0';
return -1;
}