summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2014-10-08 08:41:51 +0000
committerRene Ladan <rene@FreeBSD.org>2014-10-08 08:41:51 +0000
commit935f403d3f46a7c7804a6d99e2bb53171db157c1 (patch)
treec797b39fa9e90549727670b9173ba6b02a5df0a1 /www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc
parentDocument new vulnerabilities in www/chromium < 38.0.2125.101 (diff)
www/chromium: Update to 38.0.2125.101 and clean up pkg-plist
Thanks to all contributors: "tomek", "pavoropaev", Carlos Medina Obtained from: https://github.com/gliaskos/freebsd-chromium/ MFH: 2014Q4 Security: http://www.vuxml.org/freebsd/d2bbcc01-4ec3-11e4-ab3f-00262d5ed8ee.html
Diffstat (limited to 'www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc')
-rw-r--r--www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc43
1 files changed, 43 insertions, 0 deletions
diff --git a/www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc b/www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc
new file mode 100644
index 000000000000..2e7c482b04d3
--- /dev/null
+++ b/www/chromium/files/patch-third_party__webrtc__base__systeminfo.cc
@@ -0,0 +1,43 @@
+--- third_party/webrtc/base/systeminfo.cc.orig 2014-10-02 17:40:33 UTC
++++ third_party/webrtc/base/systeminfo.cc
+@@ -19,8 +19,12 @@
+ #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
+ #include <ApplicationServices/ApplicationServices.h>
+ #include <CoreServices/CoreServices.h>
+-#elif defined(WEBRTC_LINUX)
++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ #include <unistd.h>
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#endif
+ #endif
+ #if defined(WEBRTC_MAC)
+ #include <sys/sysctl.h>
+@@ -31,7 +35,7 @@
+ #include "webrtc/base/win32.h"
+ #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
+ #include "webrtc/base/macconversion.h"
+-#elif defined(WEBRTC_LINUX)
++#elif defined(WEBRTC_LINUX) || defined(WEBRT_BSD)
+ #include "webrtc/base/linux.h"
+ #endif
+ #include "webrtc/base/common.h"
+@@ -168,6 +172,17 @@
+ }
+ #elif defined(__native_client__)
+ // TODO(ryanpetrie): Implement this via PPAPI when it's available.
++#elif defined(OS_FREEBSD)
++ void* sysctl_value;
++ size_t length = sizeof(sysctl_value);
++ if (!sysctlbyname("hw.ncpu", &sysctl_value, &length, NULL, 0)) {
++ physical_cpus_ = *static_cast<int*>(sysctl_value);
++ }
++ if (!sysctlbyname("kern.smp.cpus", &sysctl_value, &length, NULL, 0)) {
++ logical_cpus_ = *static_cast<int*>(sysctl_value);
++ }
++ // L3 / L2 cache size?
++ // CPU family/model/stepping (available in dmesg, kernel only TODO)
+ #else // WEBRTC_LINUX
+ ProcCpuInfo proc_info;
+ if (proc_info.LoadFromSystem()) {