diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2016-07-27 19:17:40 +0300 |
---|---|---|
committer | Alex Rønne Petersen <alexrp@xamarin.com> | 2016-08-01 11:32:34 +0300 |
commit | 753c3237d9a6f9b394f2079474147529042f6cd0 (patch) | |
tree | dce9058ccf1714ef9e044da0232753cf26440d5c | |
parent | 28bfe7cee2d66d1aebb12a367ce34367516ef54c (diff) |
[arm] Also check the 'model name' line for the architecture version.mono-4.6.0.125
Some Android devices for some reason have a 'model name' line instead of a
'Processor' line. On such devices, we would fail to detect the architecture
version at all, and end up thinking that it's ARMv4 (even if the runtime
was compiled for ARMv7).
-rw-r--r-- | mono/utils/mono-hwcap-arm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mono/utils/mono-hwcap-arm.c b/mono/utils/mono-hwcap-arm.c index d5621323f9f..758c3dc6fc2 100644 --- a/mono/utils/mono-hwcap-arm.c +++ b/mono/utils/mono-hwcap-arm.c @@ -159,7 +159,8 @@ mono_hwcap_arch_init (void) if (file) { while ((line = fgets (buf, 512, file))) { - if (!strncmp (line, "Processor", 9)) { + if (!strncmp (line, "Processor", 9) || + !strncmp (line, "model name", 10)) { char *ver = strstr (line, "(v"); if (ver) { |