From: Radek Doulik Date: Mon, 12 Jan 2015 14:24:56 +0000 (+0100) Subject: do not use liblog's absolute path in DllImport X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=581ac48a56b19b07d4e4fa4a7bac16f533c18458;p=mono.git do not use liblog's absolute path in DllImport - let it for dllmap to specify the path of liblog https://github.com/xamarin/monodroid/commit/e834a251d65cb8f677ee7140450ea11e09dbf5c8 - when checking if running on Android, check the 64bit liblog location as well --- diff --git a/mcs/class/corlib/System.IO/LogcatTextWriter.cs b/mcs/class/corlib/System.IO/LogcatTextWriter.cs index ebedda41ac7..3d9787957be 100644 --- a/mcs/class/corlib/System.IO/LogcatTextWriter.cs +++ b/mcs/class/corlib/System.IO/LogcatTextWriter.cs @@ -10,6 +10,7 @@ namespace System.IO { class LogcatTextWriter : TextWriter { const string LibLog = "/system/lib/liblog.so"; + const string LibLog64 = "/system/lib64/liblog.so"; TextWriter stdout; readonly string appname; @@ -63,10 +64,10 @@ namespace System.IO { public static bool IsRunningOnAndroid () { - return File.Exists (LibLog); + return File.Exists (LibLog) || File.Exists (LibLog64); } - [DllImport (LibLog)] + [DllImport ("liblog")] static extern void __android_log_print (LogLevel level, string appname, string format, string args, IntPtr zero); static void Log (LogLevel level, string appname, string log)