Skip to content

Commit

Permalink
Merge bb77b39 into 507c06e
Browse files Browse the repository at this point in the history
  • Loading branch information
gladk committed Oct 20, 2018
2 parents 507c06e + bb77b39 commit 5d44fa5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sysinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@ int GetNumCPUs() {
if (ln.empty()) continue;
size_t SplitIdx = ln.find(':');
std::string value;
#if defined(__s390__)
if (SplitIdx != std::string::npos) value = ln.substr(SplitIdx - 1, 2);
#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()) {
Expand Down

0 comments on commit 5d44fa5

Please sign in to comment.