for v2 of the package. WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that's used by Safari, Dashboard, Mail, and many other OS X applications. WebKit's HTML and JavaScript code began as a branch of the KHTML and KJS libraries from KDE. This is the GTK2+ port of major version 1 of the engine.
32 lines
784 B
Text
32 lines
784 B
Text
$NetBSD: patch-am,v 1.1 2014/08/03 22:07:39 wiz Exp $
|
|
|
|
--- Source/WTF/wtf/RAMSize.cpp.orig 2012-10-19 13:44:57.000000000 +0000
|
|
+++ Source/WTF/wtf/RAMSize.cpp
|
|
@@ -27,7 +27,7 @@
|
|
#include "RAMSize.h"
|
|
|
|
#include "StdLibExtras.h"
|
|
-#if OS(DARWIN)
|
|
+#if OS(DARWIN) || OS(NETBSD)
|
|
#include <sys/param.h>
|
|
#include <sys/types.h>
|
|
#include <sys/sysctl.h>
|
|
@@ -45,13 +45,17 @@ static const size_t ramSizeGuess = 128 *
|
|
|
|
static size_t computeRAMSize()
|
|
{
|
|
-#if OS(DARWIN)
|
|
+#if OS(DARWIN) || OS(NETBSD)
|
|
int mib[2];
|
|
uint64_t ramSize;
|
|
size_t length;
|
|
|
|
mib[0] = CTL_HW;
|
|
+#if OS(DARWIN)
|
|
mib[1] = HW_MEMSIZE;
|
|
+#else
|
|
+ mib[1] = HW_PHYSMEM64;
|
|
+#endif
|
|
length = sizeof(int64_t);
|
|
int sysctlResult = sysctl(mib, 2, &ramSize, &length, 0, 0);
|
|
if (sysctlResult == -1)
|