Skip to content

Commit aed82f6

Browse files
authored
common : try to fix Android CI (#6780)
* common : disable get_math_cpu_count() until Android CI gets fixed * common : another try
1 parent 0e4802b commit aed82f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/common.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int32_t get_num_physical_cores() {
108108
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
109109
}
110110

111-
#if defined(__x86_64__) && defined(__linux__)
111+
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
112112
#include <pthread.h>
113113

114114
static void cpuid(unsigned leaf, unsigned subleaf,
@@ -162,7 +162,7 @@ static int count_math_cpus(int cpu_count) {
162162
* Returns number of CPUs on system that are useful for math.
163163
*/
164164
int get_math_cpu_count() {
165-
#if defined(__x86_64__) && defined(__linux__)
165+
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
166166
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
167167
if (cpu_count < 1) {
168168
return get_num_physical_cores();

0 commit comments

Comments
 (0)