aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mingw.h2
-rw-r--r--win32/mingw.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 3b7aa9469..ccf3060e7 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -129,7 +129,7 @@ int fdprintf(int fd, const char *format, ...);
129 129
130NOIMPL(clearenv,void); 130NOIMPL(clearenv,void);
131IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM); 131IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM);
132NOIMPL(mkstemp,char *template UNUSED_PARAM); 132int mkstemp(char *template);
133IMPL(realpath,char *,NULL,const char *path UNUSED_PARAM, char *resolved_path UNUSED_PARAM); 133IMPL(realpath,char *,NULL,const char *path UNUSED_PARAM, char *resolved_path UNUSED_PARAM);
134NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM); 134NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM);
135IMPL(unsetenv,void,,const char *env UNUSED_PARAM); 135IMPL(unsetenv,void,,const char *env UNUSED_PARAM);
diff --git a/win32/mingw.c b/win32/mingw.c
index b92fa82a5..3611872ec 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -7,3 +7,11 @@ unsigned int sleep (unsigned int seconds)
7 Sleep(seconds*1000); 7 Sleep(seconds*1000);
8 return 0; 8 return 0;
9} 9}
10
11int mkstemp(char *template)
12{
13 char *filename = mktemp(template);
14 if (filename == NULL)
15 return -1;
16 return open(filename, O_RDWR | O_CREAT, 0600);
17}