Skip to content

Commit 5d44fa5

Browse files
authored
Merge bb77b39 into 507c06e
2 parents 507c06e + bb77b39 commit 5d44fa5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sysinfo.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ int GetNumCPUs() {
404404
if (ln.empty()) continue;
405405
size_t SplitIdx = ln.find(':');
406406
std::string value;
407+
#if defined(__s390__)
408+
if (SplitIdx != std::string::npos) value = ln.substr(SplitIdx - 1, 2);
409+
#else
407410
if (SplitIdx != std::string::npos) value = ln.substr(SplitIdx + 1);
411+
#endif
408412
if (ln.size() >= Key.size() && ln.compare(0, Key.size(), Key) == 0) {
409413
NumCPUs++;
410414
if (!value.empty()) {

0 commit comments

Comments
 (0)