More platform support fixes
authorAndi McClure <andi.mcclure@xamarin.com>
Thu, 30 Mar 2017 15:57:49 +0000 (11:57 -0400)
committerAndi McClure <andi.mcclure@xamarin.com>
Thu, 30 Mar 2017 21:57:06 +0000 (17:57 -0400)
- Support platforms without mkdtemp
- Fix compile for console-null.c

configure.ac
eglib/src/gfile-unix.c
mono/metadata/console-null.c

index 4cebcc176fed53fd7382d5fb7be710faa1f90ed6..2100aa1a4c0eba53c61763fa29d54e0f145e239f 100644 (file)
@@ -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>
index 9c34d8756930f4fa7e898995c1d02329843f1be9..ab1fbb483bd53d995c6b86f216655563cfc2b757 100644 (file)
@@ -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
 }
index 83145afb536bd489eaa70f3e958b0ccd4c43def9..749a43452d05b6066c6ed1fbc4d6ed3996bb4c35 100644 (file)
@@ -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)