pkgsrc/mail/thunderbird31/patches/patch-mozilla_mfbt_Poison.cpp
ryoon 6e95e654f9 Import thunderbird31-31.7.0 as mail/thunderbird31.
Mozilla Thunderbird is a redesign of the Mozilla mail component. The
goal is to produce a cross platform stand alone mail application using
the XUL user interface language. This version tracks 31 ESR.
2015-07-13 17:49:26 +00:00

16 lines
533 B
C++

$NetBSD: patch-mozilla_mfbt_Poison.cpp,v 1.1 2015/07/13 17:49:26 ryoon Exp $
--- mozilla/mfbt/Poison.cpp.orig 2013-10-23 22:09:13.000000000 +0000
+++ mozilla/mfbt/Poison.cpp
@@ -125,7 +125,11 @@ ReleaseRegion(void *region, uintptr_t si
static bool
ProbeRegion(uintptr_t region, uintptr_t size)
{
+#if !defined(__sun__)
if (madvise(reinterpret_cast<void*>(region), size, MADV_NORMAL)) {
+#else
+ if (posix_madvise(reinterpret_cast<void*>(region), size, MADV_NORMAL)) {
+#endif
return true;
} else {
return false;