1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc.orig 2013-09-17 09:50:51.299150776 +0200
+++ ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc 2013-09-17 10:16:45.749663438 +0200
@@ -17,7 +17,7 @@
#include <sys/sysctl.h>
#elif defined(WEBRTC_ANDROID)
// Not implemented yet, might be possible to use Linux implementation
-#elif defined(WEBRTC_LINUX)
+#elif defined(WEBRTC_LINUX) && !defined(__UCLIBC__)
#include <sys/sysinfo.h>
#else // defined(_SC_NPROCESSORS_ONLN)
#include <unistd.h>
@@ -38,7 +38,7 @@
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", number_of_cores_);
-#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && !defined(__UCLIBC__)
number_of_cores_ = get_nprocs();
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", number_of_cores_);
@@ -64,7 +64,7 @@
number_of_cores_ = 1;
}
#elif defined(_SC_NPROCESSORS_ONLN)
- _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN);
+ number_of_cores_ = sysconf(_SC_NPROCESSORS_ONLN);
#else
WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1,
"No function to get number of cores");
|