Skip to content

Commit

Permalink
Fix building 2
Browse files Browse the repository at this point in the history
  • Loading branch information
cfnptr committed Oct 26, 2024
1 parent 469cf25 commit 0a00421
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ int getPhysicalCpuCount()
{
int cpuCount = -1;
#if __linux__
int processorCount = -1;
FILE* file = fopen("/proc/cpuinfo", "r");
if (file)
{
Expand All @@ -133,7 +134,7 @@ int getPhysicalCpuCount()
return -1;
}

int processorCount = -1;

while (fgets(buffer, 256, file))
{
if (memcmp(buffer, "cpu cores", 9) == 0)
Expand Down

0 comments on commit 0a00421

Please sign in to comment.