- Support platforms without mkdtemp - Fix compile for console-null.c
@@ -2408,6 +2408,7 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(fork execv execve)
AC_CHECK_FUNCS(accept4)
AC_CHECK_FUNCS(localtime_r)
+ AC_CHECK_FUNCS(mkdtemp)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], ,
[#include <sys/types.h>
@@ -82,7 +82,11 @@ g_file_test (const gchar *filename, GFileTest test)
gchar *
g_mkdtemp (char *tmp_template)
{
+#ifdef HAVE_MKDTEMP
char *template_copy = g_strdup (tmp_template);
return mkdtemp (template_copy);
+#else
+ g_error("Function not supported");
+#endif
}
@@ -17,6 +17,8 @@
#include <mono/metadata/console-io.h>
#include <mono/metadata/exception.h>
+#include <mono/metadata/w32file.h>
+#include <mono/utils/w32api.h>
void
mono_console_init (void)