Fix parsing of cpuinfo for s390 platform. (#712)
s390 has another line structure for processor-field.
It should be differently parsed.
diff --git a/src/sysinfo.cc b/src/sysinfo.cc
index d4e5336..d740047 100644
--- a/src/sysinfo.cc
+++ b/src/sysinfo.cc
@@ -404,7 +404,13 @@
if (ln.empty()) continue;
size_t SplitIdx = ln.find(':');
std::string value;
+#if defined(__s390__)
+ // s390 has another format in /proc/cpuinfo
+ // it needs to be parsed differently
+ if (SplitIdx != std::string::npos) value = ln.substr(Key.size()+1,SplitIdx-Key.size()-1);
+#else
if (SplitIdx != std::string::npos) value = ln.substr(SplitIdx + 1);
+#endif
if (ln.size() >= Key.size() && ln.compare(0, Key.size(), Key) == 0) {
NumCPUs++;
if (!value.empty()) {