diff options
-rw-r--r-- | include/mingw.h | 2 | ||||
-rw-r--r-- | win32/mingw.c | 8 |
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 | ||
130 | NOIMPL(clearenv,void); | 130 | NOIMPL(clearenv,void); |
131 | IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM); | 131 | IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM); |
132 | NOIMPL(mkstemp,char *template UNUSED_PARAM); | 132 | int mkstemp(char *template); |
133 | IMPL(realpath,char *,NULL,const char *path UNUSED_PARAM, char *resolved_path UNUSED_PARAM); | 133 | IMPL(realpath,char *,NULL,const char *path UNUSED_PARAM, char *resolved_path UNUSED_PARAM); |
134 | NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM); | 134 | NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM); |
135 | IMPL(unsetenv,void,,const char *env UNUSED_PARAM); | 135 | IMPL(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 | |||
11 | int 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 | } | ||