summaryrefslogtreecommitdiff
path: root/mail/thunderbird/patches/patch-al
diff options
context:
space:
mode:
Diffstat (limited to 'mail/thunderbird/patches/patch-al')
-rw-r--r--mail/thunderbird/patches/patch-al27
1 files changed, 27 insertions, 0 deletions
diff --git a/mail/thunderbird/patches/patch-al b/mail/thunderbird/patches/patch-al
new file mode 100644
index 00000000000..789e386bcd6
--- /dev/null
+++ b/mail/thunderbird/patches/patch-al
@@ -0,0 +1,27 @@
+$NetBSD: patch-al,v 1.5 2010/03/16 10:59:09 tnn Exp $
+
+# Reported upstream as https://bugzilla.mozilla.org/show_bug.cgi?id=471179
+
+--- mozilla/nsprpub/pr/src/misc/prsystem.c.orig 2009-06-29 18:15:07.000000000 +0200
++++ mozilla/nsprpub/pr/src/misc/prsystem.c
+@@ -284,6 +284,20 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem
+ long pageCount = sysconf(_SC_PHYS_PAGES);
+ bytes = (PRUint64) pageSize * pageCount;
+
++#elif defined(NETBSD)
++
++ int mib[2];
++ int rc;
++ uint64_t memSize;
++ size_t len = sizeof(memSize);
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_PHYSMEM64;
++ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
++ if ( -1 != rc ) {
++ bytes = memSize;
++ }
++
+ #elif defined(HPUX)
+
+ struct pst_static info;