diff options
Diffstat (limited to 'x11/qt5-qtwebkit/patches/patch-Source_WTF_wtf_NumberOfCores.cpp')
-rw-r--r-- | x11/qt5-qtwebkit/patches/patch-Source_WTF_wtf_NumberOfCores.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/x11/qt5-qtwebkit/patches/patch-Source_WTF_wtf_NumberOfCores.cpp b/x11/qt5-qtwebkit/patches/patch-Source_WTF_wtf_NumberOfCores.cpp new file mode 100644 index 00000000000..980eb4149d9 --- /dev/null +++ b/x11/qt5-qtwebkit/patches/patch-Source_WTF_wtf_NumberOfCores.cpp @@ -0,0 +1,32 @@ +$NetBSD: patch-Source_WTF_wtf_NumberOfCores.cpp,v 1.1 2014/12/30 17:23:47 adam Exp $ + +* Add NetBSD support + +--- Source/WTF/wtf/NumberOfCores.cpp.orig 2013-12-08 17:09:59.000000000 +0000 ++++ Source/WTF/wtf/NumberOfCores.cpp +@@ -32,6 +32,7 @@ + // data types defined in the former. See sysctl(3) and style(9). + #include <sys/types.h> + #include <sys/sysctl.h> ++#include <unistd.h> + #elif OS(LINUX) || OS(AIX) || OS(SOLARIS) + #include <unistd.h> + #elif OS(WINDOWS) +@@ -50,7 +51,7 @@ int numberOfProcessorCores() + if (s_numberOfCores > 0) + return s_numberOfCores; + +-#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD) ++#if OS(DARWIN) || OS(OPENBSD) || OS(FREEBSD) + unsigned result; + size_t length = sizeof(result); + int name[] = { +@@ -60,7 +61,7 @@ int numberOfProcessorCores() + int sysctlResult = sysctl(name, sizeof(name) / sizeof(int), &result, &length, 0, 0); + + s_numberOfCores = sysctlResult < 0 ? defaultIfUnavailable : result; +-#elif OS(LINUX) || OS(AIX) || OS(SOLARIS) ++#elif OS(LINUX) || OS(AIX) || OS(SOLARIS) || OS(NETBSD) + long sysconfResult = sysconf(_SC_NPROCESSORS_ONLN); + + s_numberOfCores = sysconfResult < 0 ? defaultIfUnavailable : static_cast<int>(sysconfResult); |