Commit 18859963 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cpu: fix a typo and cpu detection on Mac OS.

parent 4106f477
...@@ -344,7 +344,7 @@ unsigned vlc_GetCPUCount(void) ...@@ -344,7 +344,7 @@ unsigned vlc_GetCPUCount(void)
for (unsigned i = 0; i < CPU_SETSIZE; i++) for (unsigned i = 0; i < CPU_SETSIZE; i++)
count += CPU_ISSET(i, &cpu) != 0; count += CPU_ISSET(i, &cpu) != 0;
return count; return count;
#elif defined(__APPLE_) #elif defined(__APPLE__)
int count; int count;
size_t size = sizeof(count) ; size_t size = sizeof(count) ;
if (sysctlbyname("hw.ncpu", &count, &size, NULL, 0)) if (sysctlbyname("hw.ncpu", &count, &size, NULL, 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment