mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-11 23:00:52 +00:00
30 lines
851 B
Diff
30 lines
851 B
Diff
--- a/src/util.cc
|
|
+++ b/src/util.cc
|
|
@@ -47,7 +47,7 @@
|
|
#include <sys/loadavg.h>
|
|
#elif defined(_AIX) && !defined(__PASE__)
|
|
#include <libperfstat.h>
|
|
-#elif defined(linux) || defined(__GLIBC__)
|
|
+#elif defined(__linux__) || defined(__GLIBC__)
|
|
#include <sys/sysinfo.h>
|
|
#include <fstream>
|
|
#include <map>
|
|
@@ -589,7 +589,7 @@
|
|
return stripped;
|
|
}
|
|
|
|
-#if defined(linux) || defined(__GLIBC__)
|
|
+#if defined(__linux__) || defined(__GLIBC__)
|
|
std::pair<int64_t, bool> 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
|