From 581ac48a56b19b07d4e4fa4a7bac16f533c18458 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 12 Jan 2015 15:24:56 +0100 Subject: [PATCH] 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 --- mcs/class/corlib/System.IO/LogcatTextWriter.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.25.1