Merge pull request #3591 from directhex/mono_libdir_fallback
[mono.git] / mono / metadata / assembly.c
index 64d1000bbb63b8f896164af207e176969b6ece3c..643c4930b1a29360e4c80fc4cae1df1cf51da0bf 100644 (file)
@@ -559,6 +559,21 @@ mono_assembly_getrootdir (void)
        return default_path [0];
 }
 
+/**
+ * mono_native_getrootdir:
+ * 
+ * Obtains the root directory used for looking up native libs (.so, .dylib).
+ *
+ * Returns: a string with the directory, this string should be freed by
+ * the caller.
+ */
+G_CONST_RETURN gchar *
+mono_native_getrootdir (void)
+{
+       gchar* fullpath = g_build_path (G_DIR_SEPARATOR_S, mono_assembly_getrootdir (), mono_config_get_reloc_lib_dir(), NULL);
+       return fullpath;
+}
+
 /**
  * mono_set_dirs:
  * @assembly_dir: the base directory for assemblies