Merge pull request #2819 from BrzVlad/fix-major-log
[mono.git] / mono / profiler / mono-profiler-aot.c
index da8b261838e4e7ec282a0ce93a474260ca2cd4bf..4cf48bbd1b2491a54e3155c2c793b1934d5bb441 100644 (file)
@@ -9,8 +9,10 @@
  * The AOT compiler can load these files during compilation.
  * Currently, only the order in which methods were compiled is saved, 
  * allowing more efficient function ordering in the AOT files.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
+#include <config.h>
 #include <mono/metadata/profiler.h>
 #include <mono/metadata/tokentype.h>
 #include <mono/metadata/tabledefs.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <glib.h>
 #include <sys/stat.h>
 
+#ifdef HOST_WIN32
+#include <direct.h>
+#endif
+
 struct _MonoProfiler {
        GHashTable *images;
 };
@@ -118,7 +125,7 @@ prof_jit_leave (MonoProfiler *prof, MonoMethod *method, int result)
        MonoImage *image = mono_class_get_image (mono_method_get_class (method));
        PerImageData *data;
 
-       data = g_hash_table_lookup (prof->images, image);
+       data = (PerImageData *)g_hash_table_lookup (prof->images, image);
        if (!data) {
                data = g_new0 (PerImageData, 1);
                g_hash_table_insert (prof->images, image, data);