Merge pull request #668 from pcercuei/update-lightrec-20220607
[pcsx_rearmed.git] / deps / lightrec / recompiler.c
index 4ddc522..7350adb 100644 (file)
@@ -48,7 +48,7 @@ struct recompiler {
 
 static unsigned int get_processors_count(void)
 {
-       unsigned int nb;
+       unsigned int nb = 1;
 
 #if defined(PTW32_VERSION)
         nb = pthread_num_processors_np();
@@ -57,7 +57,7 @@ static unsigned int get_processors_count(void)
         size_t size = sizeof(count);
 
         nb = sysctlbyname("hw.ncpu", &count, &size, NULL, 0) ? 1 : count;
-#elif defined(__linux__)
+#elif defined(_SC_NPROCESSORS_ONLN)
        nb = sysconf(_SC_NPROCESSORS_ONLN);
 #endif