summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorRichard PALO <richard@NetBSD.org>2014-11-10 17:28:59 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-11 19:50:13 +0100
commit821b016a5054c69ef64a341c1d0c390ec31d86cc (patch)
treef7717753335217efa561fc64c7cce1d56fdeec41 /sal
parent062e19093e3244eea9e0003e344a5400a74ad43c (diff)
SOLARIS can use/should use posix_madvise under certain conditions.
Change-Id: Idc40752b4beee932b5912e6df9fe6acb15571201 Signed-off-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 92c5bc7d6bc9dec429114a0f72f6f5989d70f731)
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index a7eaac15e1f8..705b8079b9b8 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1167,7 +1167,7 @@ SAL_CALL osl_mapFile (
// OS simultaneously pages in the rest); on other platforms, it remains
// to be evaluated whether madvise or equivalent is available and
// actually useful:
-#if defined MACOSX
+#if defined MACOSX || ( defined(SOLARIS) && ( !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) ) )
int e = posix_madvise(p, nLength, POSIX_MADV_WILLNEED);
if (e != 0)
{