--- a/src/util.cc +++ b/src/util.cc @@ -47,7 +47,7 @@ #include #elif defined(_AIX) && !defined(__PASE__) #include -#elif defined(linux) || defined(__GLIBC__) +#elif defined(__linux__) || defined(__GLIBC__) #include #include #include @@ -589,7 +589,7 @@ return stripped; } -#if defined(linux) || defined(__GLIBC__) +#if defined(__linux__) || defined(__GLIBC__) std::pair readCount(const std::string& path) { std::ifstream file(path.c_str()); if (!file.is_open()) @@ -789,7 +789,7 @@ #else int cgroupCount = -1; int schedCount = -1; -#if defined(linux) || defined(__GLIBC__) +#if defined(__linux__) || defined(__GLIBC__) cgroupCount = ParseCPUFromCGroup(); #endif // The number of exposed processors might not represent the actual number of