Skip to content

Commit bc9c9ab

Browse files
committed
Merge pull request opencv#9877 from mapreri:non-linux
2 parents c6fc7cc + d026d7d commit bc9c9ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/core/src/parallel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#undef abs
5353
#endif
5454

55-
#if defined __linux__ || defined __APPLE__
55+
#if defined __linux__ || defined __APPLE__ || defined __GLIBC__
5656
#include <unistd.h>
5757
#include <stdio.h>
5858
#include <sys/types.h>
@@ -672,7 +672,7 @@ int cv::getNumberOfCPUs(void)
672672
#elif defined __ANDROID__
673673
static int ncpus = getNumberOfCPUsImpl();
674674
return ncpus;
675-
#elif defined __linux__
675+
#elif defined __linux__ || defined __GLIBC__
676676
return (int)sysconf( _SC_NPROCESSORS_ONLN );
677677
#elif defined __APPLE__
678678
int numCPU=0;

modules/core/src/system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
215215
#include "omp.h"
216216
#endif
217217

218-
#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __FreeBSD__ || defined __HAIKU__
218+
#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __FreeBSD__ || defined __GLIBC__ || defined __HAIKU__
219219
#include <unistd.h>
220220
#include <stdio.h>
221221
#include <sys/types.h>

0 commit comments

Comments
 (0)