From 0a00421b36a965cc890da8a1e3ae5b36c8e191c1 Mon Sep 17 00:00:00 2001 From: Nikita Fediuchin Date: Sun, 27 Oct 2024 00:09:15 +0300 Subject: [PATCH] Fix building 2 --- source/os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/os.c b/source/os.c index 41a00f2..b3ce8d0 100644 --- a/source/os.c +++ b/source/os.c @@ -123,6 +123,7 @@ int getPhysicalCpuCount() { int cpuCount = -1; #if __linux__ + int processorCount = -1; FILE* file = fopen("/proc/cpuinfo", "r"); if (file) { @@ -133,7 +134,7 @@ int getPhysicalCpuCount() return -1; } - int processorCount = -1; + while (fgets(buffer, 256, file)) { if (memcmp(buffer, "cpu cores", 9) == 0)